Netdev List
 help / color / mirror / Atom feed
* [patch] arcnet: cleanup sizeof parameter
@ 2013-07-19  5:48 Dan Carpenter
  2013-07-20  0:37 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-07-19  5:48 UTC (permalink / raw)
  To: netdev; +Cc: kernel-janitors

This patch doesn't change the compiled code because ARC_HDR_SIZE is 4
and sizeof(int) is 4, but the intent was to use the header size and not
the sizeof the header size.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c
index a746ba2..a956053 100644
--- a/drivers/net/arcnet/arcnet.c
+++ b/drivers/net/arcnet/arcnet.c
@@ -1007,7 +1007,7 @@ static void arcnet_rx(struct net_device *dev, int bufnum)
 
 	soft = &pkt.soft.rfc1201;
 
-	lp->hw.copy_from_card(dev, bufnum, 0, &pkt, sizeof(ARC_HDR_SIZE));
+	lp->hw.copy_from_card(dev, bufnum, 0, &pkt, ARC_HDR_SIZE);
 	if (pkt.hard.offset[0]) {
 		ofs = pkt.hard.offset[0];
 		length = 256 - ofs;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] arcnet: cleanup sizeof parameter
  2013-07-19  5:48 [patch] arcnet: cleanup sizeof parameter Dan Carpenter
@ 2013-07-20  0:37 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-07-20  0:37 UTC (permalink / raw)
  To: dan.carpenter; +Cc: netdev, kernel-janitors

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Fri, 19 Jul 2013 08:48:05 +0300

> This patch doesn't change the compiled code because ARC_HDR_SIZE is 4
> and sizeof(int) is 4, but the intent was to use the header size and not
> the sizeof the header size.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-20  0:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-19  5:48 [patch] arcnet: cleanup sizeof parameter Dan Carpenter
2013-07-20  0:37 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox