1
0
Fork 0
remarkable-linux/drivers/net/ethernet/broadcom
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
..
bnx2x Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
bnxt net: propagate tc filter chain index down the ndo_setup_tc call 2017-06-08 09:55:53 -04:00
genet net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
Kconfig tg3: Add the ability to conditionally build w/ HWMON 2017-03-09 13:03:00 -08:00
Makefile net: ethernet: bgmac: Add platform device support 2016-07-09 18:10:41 -04:00
b44.c net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
b44.h net: ethernet: broadcom: b44: use phydev from struct net_device 2016-09-19 21:39:11 -04:00
bcm63xx_enet.c networking: use skb_put_zero() 2017-06-13 13:54:03 -04:00
bcm63xx_enet.h net: ethernet: broadcom: bcm63xx: use phydev from struct net_device 2016-09-19 21:39:12 -04:00
bcmsysport.c networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
bcmsysport.h net: systemport: Track per TX ring statistics 2017-03-24 12:53:14 -07:00
bgmac-bcma-mdio.c net: bgmac: use PHY subsystem for initializing PHY 2017-01-31 13:44:49 -05:00
bgmac-bcma.c net: ethernet: bgmac: Allow MAC address to be specified in DTB 2017-03-16 11:57:26 -07:00
bgmac-platform.c net: ethernet: bgmac: driver power manangement 2017-03-06 17:17:47 -08:00
bgmac.c drivers: add explicit interrupt.h includes 2017-03-30 11:05:34 -07:00
bgmac.h net: ethernet: bgmac: driver power manangement 2017-03-06 17:17:47 -08:00
bnx2.c drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
bnx2.h ethernet/broadcom: use core min/max MTU checking 2016-10-18 11:34:18 -04:00
bnx2_fw.h bnx2-cnic: Driver Rebranding Changes 2015-02-20 15:46:49 -05:00
cnic.c net-next: treewide use is_vlan_dev() helper function. 2017-02-06 16:33:29 -05:00
cnic.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
cnic_defs.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
cnic_if.h cnic: Add the interfaces to get FC-NPIV table. 2015-08-06 21:54:12 -07:00
sb1250-mac.c NET: sb1250-mac: Add missing MODULE_LICENSE() 2017-04-21 03:22:49 +02:00
tg3.c net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
tg3.h mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00