2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-28 07:04:00 +08:00
linux-next/drivers/net/ethernet/chelsio/cxgb
Johannes Berg d58ff35122 networking: make skb_push & __skb_push return void pointers
It seems like a historic accident that these return unsigned char *,
and in many places that means casts are required, more often than not.

Make these functions return void * and remove all the casts across
the tree, adding a (u8 *) cast only where the unsigned char pointer
was used directly, all done with the following spatch:

    @@
    expression SKB, LEN;
    typedef u8;
    identifier fn = { skb_push, __skb_push, skb_push_rcsum };
    @@
    - *(fn(SKB, LEN))
    + *(u8 *)fn(SKB, LEN)

    @@
    expression E, SKB, LEN;
    identifier fn = { skb_push, __skb_push, skb_push_rcsum };
    type T;
    @@
    - E = ((T *)(fn(SKB, LEN)))
    + E = fn(SKB, LEN)

    @@
    expression SKB, LEN;
    identifier fn = { skb_push, __skb_push, skb_push_rcsum };
    @@
    - fn(SKB, LEN)[0]
    + *(u8 *)fn(SKB, LEN)

Note that the last part there converts from push(...)[0] to the
more idiomatic *(u8 *)push(...).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-16 11:48:40 -04:00
..
common.h net: cxgb: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
cphy.h chelsio: constify cphy_ops structures 2016-01-04 21:58:28 -05:00
cpl5_cmd.h ethernet: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
cxgb2.c net: cxgb: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
elmer0.h ethernet: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
espi.c ethernet: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
espi.h ethernet: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
fpga_defs.h
gmac.h ethernet: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
Makefile
mv88e1xxx.c chelsio: constify cphy_ops structures 2016-01-04 21:58:28 -05:00
mv88e1xxx.h
mv88x201x.c chelsio: constify cphy_ops structures 2016-01-04 21:58:28 -05:00
my3126.c chelsio: constify cphy_ops structures 2016-01-04 21:58:28 -05:00
pm3393.c ethernet: use core min/max MTU checking 2016-10-18 11:34:22 -04:00
regs.h ethernet: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
sge.c networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
sge.h ethernet: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
subr.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
suni1x10gexp_regs.h ethernet: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
tp.c
tp.h
vsc7326_reg.h
vsc7326.c ethernet: use core min/max MTU checking 2016-10-18 11:34:22 -04:00