Skip to contentSkip to conversation

arcnet: cleanup sizeof parameter

PATCH Applied Dan Carpenter 2 participants 2 messages Jul 19, 2013 – Jul 20, 2013

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arcnet: cleanup sizeof parameter

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.

drivers/net/arcnet/arcnet.c +1 -1
index a746ba2..a956053 100644
@@ -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;
maintainer Applied
#1 lore raw

From: Dan Carpenter <[email protected]>
Date: Fri, 19 Jul 2013 08:48:05 +0300

Quoted 5 lines

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.

Applied.