linux/drivers/scsi/fcoe
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
..
fcoe_ctlr.c networking: convert many more places to skb_put_zero() 2017-06-16 11:48:35 -04:00
fcoe_sysfs.c scsi: fcoe: catch invalid values for the 'enabled' attribute 2016-11-08 17:29:53 -05:00
fcoe_transport.c scsi: fcoe: fix off by one in eth2fc_speed() 2016-09-26 20:54:45 -04:00
fcoe.c scsi: fcoe: make fcoe_e_d_tov and fcoe_r_a_tov static 2017-04-25 13:00:59 -04:00
fcoe.h fcoe: Use default VLAN for FIP VLAN discovery 2016-07-27 00:32:08 -04:00
libfcoe.h libfc, libfcoe, fcoe: Convert debug_logging macros to pr_info 2012-12-14 10:38:55 -08:00
Makefile [SCSI] libfcoe: Add fcoe_sysfs 2012-05-23 09:40:09 +01:00