diff options
author | Johannes Berg <johannes.berg@intel.com> | 2017-06-13 14:28:18 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-13 19:54:03 +0200 |
commit | aa9f979c41043d9fcf7957c99948e20bbddefc7f (patch) | |
tree | 121013b5d9c5ae6189070a7bb9f7d209962e4a22 /drivers/nfc | |
parent | Merge tag 'mac80211-next-for-davem-2017-06-13' of git://git.kernel.org/pub/sc... (diff) | |
download | linux-aa9f979c41043d9fcf7957c99948e20bbddefc7f.tar.xz linux-aa9f979c41043d9fcf7957c99948e20bbddefc7f.zip |
networking: use skb_put_zero()
Use the recently introduced helper to replace the pattern of
skb_put() && memset(), this transformation was 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 <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/nfc')
-rw-r--r-- | drivers/nfc/pn533/pn533.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nfc/pn533/pn533.c b/drivers/nfc/pn533/pn533.c index 65bbaa5fcdda..70c304504a29 100644 --- a/drivers/nfc/pn533/pn533.c +++ b/drivers/nfc/pn533/pn533.c @@ -1043,8 +1043,7 @@ static struct sk_buff *pn533_alloc_poll_tg_frame(struct pn533 *dev) get_random_bytes(felica + 2, 6); /* NFCID3 */ - nfcid3 = skb_put(skb, 10); - memset(nfcid3, 0, 10); + nfcid3 = skb_put_zero(skb, 10); memcpy(nfcid3, felica, 8); /* General bytes */ |