linux-stable/drivers/net
Johannes Berg b080db5853 networking: convert many more places to skb_put_zero()
There were many places that my previous spatch didn't find,
as pointed out by yuan linyu in various patches.

The following spatch found many more and also removes the
now unnecessary casts:

    @@
    identifier p, p2;
    expression len;
    expression skb;
    type t, t2;
    @@
    (
    -p = skb_put(skb, len);
    +p = skb_put_zero(skb, len);
    |
    -p = (t)skb_put(skb, len);
    +p = skb_put_zero(skb, len);
    )
    ... when != p
    (
    p2 = (t2)p;
    -memset(p2, 0, len);
    |
    -memset(p, 0, len);
    )

    @@
    type t, t2;
    identifier p, p2;
    expression skb;
    @@
    t *p;
    ...
    (
    -p = skb_put(skb, sizeof(t));
    +p = skb_put_zero(skb, sizeof(t));
    |
    -p = (t *)skb_put(skb, sizeof(t));
    +p = skb_put_zero(skb, sizeof(t));
    )
    ... when != p
    (
    p2 = (t2)p;
    -memset(p2, 0, sizeof(*p));
    |
    -memset(p, 0, sizeof(*p));
    )

    @@
    expression skb, len;
    @@
    -memset(skb_put(skb, len), 0, len);
    +skb_put_zero(skb, len);

Apply it to the tree (with one manual fixup to keep the
comment in vxlan.c, which spatch removed.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-16 11:48:35 -04:00
..
appletalk
arcnet
bonding Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
caif net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
cris
dsa net: dsa: mv88e6xxx: prefix Global Prio and Tag macros 2017-06-15 14:07:50 -04:00
ethernet networking: convert many more places to skb_put_zero() 2017-06-16 11:48:35 -04:00
fddi
fjes fjes: remove duplicate set of flag IFF_BROADCAST 2017-06-13 13:54:51 -04:00
hamradio net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
hippi
hyperv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
ieee802154
ipvlan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
irda
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
plip
ppp ppp: mppe: Use vsnprintf extension %phN 2017-06-06 15:16:33 -04:00
slip net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
team Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
usb networking: convert many more places to skb_put_zero() 2017-06-16 11:48:35 -04:00
vmxnet3
wan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
wimax
wireless networking: convert many more places to skb_put_zero() 2017-06-16 11:48:35 -04:00
xen-netback
dummy.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
eql.c
geneve.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
gtp.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
ifb.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
Kconfig
LICENSE.SRC
loopback.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
macsec.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
macvlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
macvtap.c
Makefile
mdio.c
mii.c
netconsole.c netconsole: Remove duplicate "netconsole: " logging prefix 2017-06-13 12:57:40 -04:00
nlmon.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c drivers/net/sungem: add const to mii_phy_ops structures 2017-06-08 15:32:47 -04:00
tap.c
tun.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
veth.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
virtio_net.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-06 22:20:08 -04:00
vrf.c net: vrf: Make add_fib_rules per network namespace flag 2017-06-08 19:27:42 -04:00
vsockmon.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
vxlan.c networking: convert many more places to skb_put_zero() 2017-06-16 11:48:35 -04:00
xen-netfront.c