Re: [RFC 3/3] networking: make skb_push & __skb_push return void pointers

From
Joe Perches <joe@perches.com>
Date
2017-06-16 09:19:22
Reply to
Johannes Berg, 2017-06-15
On Fri, 2017-06-16 at 00:12 +0200, Johannes Berg wrote:
From: Johannes Berg <redacted>
[]
quoted hunk ↗ jump to hunk
diff --git a/drivers/nfc/pn533/pn533.c b/drivers/nfc/pn533/pn533.c
[]
quoted hunk ↗ jump to hunk
@@ -2090,10 +2090,10 @@ static int pn533_fill_fragment_skbs(struct pn533 *dev, struct sk_buff *skb)
 
 			/* MI + TG */
 			if (frag_size  == PN533_CMD_DATAFRAME_MAXLEN)
-				*skb_push(frag, sizeof(u8)) =
-							(PN533_CMD_MI_MASK | 1);
-			else
-				*skb_push(frag, sizeof(u8)) =  1; /* TG */
+				*(u8 *)skb_push(frag, sizeof(u8)) =
+									(PN533_CMD_MI_MASK | 1);
+				else
+					*(u8 *)skb_push(frag, sizeof(u8)) =  1; /* TG */
Can you check all the if/else uses.
This one is not formatted correctly.
I didn't look at any others.
Thread (11 messages) 11 messages, 3 authors, last reply 2017-06-16
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help