Thread (18 messages) flat view 18 messages, 3 authors, 2012-02-08

Re: [PATCH v5 4/5] netdev: ethernet dev_alloc_skb to netdev_alloc_skb

From: David Miller <davem@davemloft.net>
Date: 2012-02-06 17:07:46
Also in: lkml

From: "Pradeep A. Dalvi" <redacted>
Date: Sun,  5 Feb 2012 18:21:05 +0530
From: Pradeep A Dalvi <redacted>

Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet
  - Removed extra skb->dev = dev after netdev_alloc_skb

Signed-off-by: Pradeep A Dalvi <redacted>
I'm not applying this, you screw up the code formatting in too
many locations.

Do NOT take the output of checkpatch literally, look at the result
and determine on your own whether it looks reasonable or not:
-		struct sk_buff *skb = dev_alloc_skb(np->rx_buf_sz + NV_RX_ALLOC_PAD);
+		struct sk_buff *skb =
+			netdev_alloc_skb(dev, np->rx_buf_sz + NV_RX_ALLOC_PAD);
This, looks like crap.  The longer line is better.
-			struct sk_buff *skb = dev_alloc_skb(hmp->rx_buf_sz + 2);
+			struct sk_buff *skb = netdev_alloc_skb(dev,
+					hmp->rx_buf_sz + 2);
Same thing here.
-			struct sk_buff *skb = dev_alloc_skb(yp->rx_buf_sz + 2);
+			struct sk_buff *skb = netdev_alloc_skb(dev,
+					yp->rx_buf_sz + 2);
Column line-up rule violated, and this looks like crap as a result.  The long
single line would look 100 times better.

And there are many other instances of this problem.

Here's my advice, just do the textual change of the function name and add
the network device argument, don't mess with the coding style at all.

You're fare much better than how these patches ended up in the cases where
you tried to "improve" things.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help