linux/net/8021q
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
..
Kconfig 8021q: update description 2014-01-21 17:01:25 -08:00
Makefile net/8021q: Implement Multiple VLAN Registration Protocol (MVRP) 2013-02-10 20:37:22 -05:00
vlan.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
vlan.h netns: make struct pernet_operations::id unsigned int 2016-11-18 10:59:15 -05:00
vlan_core.c vlan: Do not put vlan headers back on bridge and macvlan ports 2015-11-17 14:38:35 -05:00
vlan_dev.c networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
vlan_gvrp.c net: vlan: prepare for 802.1ad support 2013-04-19 14:45:27 -04:00
vlan_mvrp.c net: vlan: prepare for 802.1ad support 2013-04-19 14:45:27 -04:00
vlan_netlink.c netlink: pass extended ACK struct to parsing functions 2017-04-13 13:58:22 -04:00
vlanproc.c vlan: change return type of vlan_proc_rem_dev 2016-02-17 22:06:28 -05:00
vlanproc.h vlan: change return type of vlan_proc_rem_dev 2016-02-17 22:06:28 -05:00