kernel_optimize_test/drivers/net/usb
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
..
asix_common.c net: asix: Avoid looping when the device does not respond 2016-10-14 16:06:54 -04:00
asix_devices.c net: usbnet: support 64bit stats 2017-04-03 19:09:40 -07:00
asix.h net: asix: Add in_pm parameter 2016-08-31 21:07:05 -07:00
ax88172a.c net: usbnet: support 64bit stats 2017-04-03 19:09:40 -07:00
ax88179_178a.c net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
catc.c net: usb: catc: use new api ethtool_{get|set}_link_ksettings 2017-03-13 15:25:53 -07:00
cdc_eem.c
cdc_ether.c cdc-ether: divorce initialisation with a filter reset and a generic method 2017-05-23 11:01:28 -04:00
cdc_mbim.c net: usbnet: support 64bit stats 2017-04-03 19:09:40 -07:00
cdc_ncm.c networking: convert many more places to skb_put_zero() 2017-06-16 11:48:35 -04:00
cdc_subset.c
cdc-phonet.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
ch9200.c net: ch9200: add missing USB-descriptor endianness conversions 2017-05-12 12:15:46 -04:00
cx82310_eth.c cx82310_eth: use skb_cow_head() to deal with cloned skbs 2017-04-21 13:24:05 -04:00
dm9601.c net: usbnet: support 64bit stats 2017-04-03 19:09:40 -07:00
gl620a.c
hso.c net: hso: register netdev later to avoid a race condition 2017-04-28 16:11:48 -04:00
huawei_cdc_ncm.c
int51x1.c net: usbnet: support 64bit stats 2017-04-03 19:09:40 -07:00
ipheth.c
kalmia.c networking: convert many more places to skb_put_zero() 2017-06-16 11:48:35 -04:00
kaweth.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-21 20:23:53 -07:00
Kconfig usb: plusb: Add support for PL-27A1 2017-04-25 10:08:16 -04:00
lan78xx.c net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
lan78xx.h lan78xx: add LAN7801 MAC only support 2016-12-08 14:21:47 -05:00
lg-vl600.c
Makefile USB: cdc_subset: only build when one driver is enabled 2016-02-18 15:59:45 -05:00
mcs7830.c net: usbnet: support 64bit stats 2017-04-03 19:09:40 -07:00
net1080.c net1080: Remove unused function nc_dump_ttl() 2017-05-18 14:46:07 -04:00
pegasus.c usbnet: pegasus: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
pegasus.h usbnet: pegasus: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
plusb.c usb: plusb: Add support for PL-27A1 2017-04-25 10:08:16 -04:00
qmi_wwan.c qmi_wwan: new Telewell and Sierra device IDs 2017-06-13 13:20:42 -04:00
r8152.c r8152: move calling delay_autosuspend function 2017-06-16 11:37:13 -04:00
rndis_host.c net: usbnet: support 64bit stats 2017-04-03 19:09:40 -07:00
rtl8150.c net: usb: rtl8150: use new api ethtool_{get|set}_link_ksettings 2017-03-13 15:25:54 -07:00
sierra_net.c net: usbnet: support 64bit stats 2017-04-03 19:09:40 -07:00
smsc75xx.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-21 20:23:53 -07:00
smsc75xx.h
smsc95xx.c smsc95xx: Support only IPv4 TCP/UDP csum offload 2017-05-21 13:31:48 -04:00
smsc95xx.h smsc95xx: Add comments to the registers definition 2017-04-17 13:04:52 -04:00
sr9700.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-21 20:23:53 -07:00
sr9700.h
sr9800.c net: usbnet: support 64bit stats 2017-04-03 19:09:40 -07:00
sr9800.h
usbnet.c net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
zaurus.c