1
0
Fork 0
remarkable-linux/drivers/net/ethernet/freescale
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
..
dpaa net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
fman fsl/fman: take into account all RGMII modes 2017-04-01 11:49:14 -07:00
fs_enet net: ethernet: fs_enet: Remove useless includes 2017-03-16 11:15:15 -07:00
Kconfig Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 19:56:15 -08:00
Makefile Makefile: drop -D__CHECK_ENDIAN__ from cflags 2016-12-16 00:13:43 +02:00
fec.h net: fec: Clear and enable MIB counters on imx51 2017-06-07 10:06:52 -04:00
fec_main.c net: fec: Add a fec_enet_clear_ethtool_stats() stub for CONFIG_M5272 2017-06-10 16:45:22 -04:00
fec_mpc52xx.c net: deprecate eth_change_mtu, remove usage 2016-10-13 09:36:57 -04:00
fec_mpc52xx.h drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
fec_mpc52xx_phy.c mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00
fec_ptp.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
fsl_pq_mdio.c net: freescale: fix potential null pointer dereference 2017-05-31 14:23:38 -04:00
gianfar.c networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
gianfar.h Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
gianfar_ethtool.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
gianfar_ptp.c ptp: gianfar: Use high resolution frequency method. 2016-11-27 15:26:15 -05:00
ucc_geth.c net: ethernet: ucc_geth: fix MEM_PART_MURAM mode 2017-04-30 01:26:32 -05:00
ucc_geth.h QE: Move QE from arch/powerpc to drivers/soc 2015-12-22 17:12:56 -06:00
ucc_geth_ethtool.c net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
xgmac_mdio.c net/fsl: use of_property_read_bool 2016-08-08 16:15:00 -07:00