Re: [RFC] skbuff: introduce skb_put_zero()
From: David Miller <hidden>
Date: 2017-05-25 17:01:17
Also in:
linux-wireless
From: David Miller <hidden>
Date: 2017-05-25 17:01:17
Also in:
linux-wireless
From: Johannes Berg <redacted> Date: Wed, 24 May 2017 09:07:47 +0200
From: Johannes Berg <redacted>
This pattern was introduced a number of times in mac80211 just now,
and since it's present in a number of other places it makes sense
to add a little helper for it.
The transformations of all code were done with the following spatch:
@@
identifier p;
expression len;
expression skb;
@@
-p = skb_put(skb, len);
-memset(p, 0, len);
+p = skb_put_zero(skb, len);
Signed-off-by: Johannes Berg <redacted>
---
NB: the patch won't apply to net-next because a few of the mac80211
users don't exist there yetAcked-by: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> No objections, feel free to push this in via your mac80211 tree.