1
0
Fork 0
alistair23-linux/drivers/net/ethernet
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
..
3com networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
8390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-05-26 20:46:35 -04:00
adaptec
adi
aeroflex networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
agere networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
alacritech
allwinner networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
alteon
altera
amazon net: ena: update ena driver to version 1.1.7 2017-06-11 16:36:47 -04:00
amd net: propagate tc filter chain index down the ndo_setup_tc call 2017-06-08 09:55:53 -04:00
apm net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
apple networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
aquantia Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
arc net: arc_emac: switch to phy_start()/phy_stop() 2017-04-21 15:23:52 -04:00
atheros net: atheros: atl2: don't return zero on failure path in atl2_probe() 2017-05-22 12:05:01 -04:00
aurora networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
broadcom networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
brocade bna: ethtool: Avoid reading past end of buffer 2017-05-08 14:41:42 -04:00
cadence networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
calxeda
cavium networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
chelsio networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
cirrus networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
cisco enic: unmask intr only when napi is complete 2017-05-23 11:05:45 -04:00
davicom networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
dec networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
dlink net: dl2k: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
emulex Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-05-26 20:46:35 -04:00
ezchip
faraday net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
freescale networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
fujitsu
hisilicon net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
hp networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
i825xx networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
ibm ibmvnic: Exit polling routine correctly during adapter reset 2017-06-15 14:29:00 -04:00
intel networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
marvell networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
mediatek net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
mellanox networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
micrel networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
microchip
moxa net: moxa: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
myricom
natsemi format-security: move static strings to const 2017-05-08 17:15:14 -07:00
neterion net: s2io: remove useless variable in fill_rx_buffers 2017-06-15 14:15:13 -04:00
netronome nfp: report application FW build name in ethtool -i 2017-06-09 12:52:09 -04:00
nuvoton net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
nvidia forcedeth: remove unnecessary carrier status check 2017-05-04 10:57:41 -04:00
nxp networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
oki-semi net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
packetengines
pasemi
qlogic networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
qualcomm networking: use skb_put_zero() 2017-06-13 13:54:03 -04:00
rdc
realtek net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
renesas net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
rocker rocker: Remove support bridge bypass FDB 2017-06-08 14:16:30 -04:00
samsung net: ethernet: update drivers to make both SW and HW TX timestamps 2017-05-21 13:37:32 -04:00
seeq
sfc networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
sgi net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
silan networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
sis net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
smsc net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
stmicro Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
sun networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
synopsys net: dwc-xlgmac: add the initial ethtool support 2017-04-13 13:46:38 -04:00
tehuti
ti net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
tile net: ethernet: update drivers to handle HWTSTAMP_FILTER_NTP_ALL 2017-05-21 13:37:32 -04:00
toshiba networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
tundra net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
via net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void 2017-06-05 11:00:42 -04:00
wiznet net: ethernet: wiznet: avoid format string exposure 2017-04-06 13:38:11 -07:00
xilinx
xircom
xscale
Kconfig
Makefile
dnet.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
dnet.h
ec_bhf.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
ethoc.c net: ethoc: enable NAPI before poll may be scheduled 2017-06-06 16:22:51 -04:00
fealnx.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
jme.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
jme.h
korina.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
lantiq_etop.c
netx-eth.c