linux/drivers/infiniband/hw/cxgb4
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
..
cm.c networking: convert many more places to skb_put_zero() 2017-06-16 11:48:35 -04:00
cq.c cxgb4: Convert PDBG to pr_debug 2017-04-20 16:14:13 -04:00
device.c RDMA/iw_cxgb4: calculate t4_eq_status_entries properly 2017-06-01 17:02:50 -04:00
ev.c cxgb4: Convert PDBG to pr_debug 2017-04-20 16:14:13 -04:00
id_table.c
iw_cxgb4.h cxgb4: Convert PDBG to pr_debug 2017-04-20 16:14:13 -04:00
Kconfig libcxgb,iw_cxgb4,cxgbit: add cxgb_get_4tuple() 2016-09-15 20:49:19 -04:00
Makefile libcxgb,iw_cxgb4,cxgbit: add cxgb_get_4tuple() 2016-09-15 20:49:19 -04:00
mem.c IB: Replace ib_umem page_size by page_shift 2017-04-25 15:40:28 -04:00
provider.c IB/core: Rename struct ib_ah_attr to rdma_ah_attr 2017-05-01 14:32:43 -04:00
qp.c cxgb4: Convert PDBG to pr_debug 2017-04-20 16:14:13 -04:00
resource.c cxgb4: Convert PDBG to pr_debug 2017-04-20 16:14:13 -04:00
t4.h cxgb4: Convert PDBG to pr_debug 2017-04-20 16:14:13 -04:00
t4fw_ri_api.h iw_cxgb4: add fast-path for small REG_MR operations 2016-10-07 16:54:40 -04:00