1
0
Fork 0
remarkable-linux/include
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
..
acpi Merge branch 'acpica-fixes' 2017-06-15 01:52:32 +02:00
asm-generic Kbuild UAPI header export updates for v4.12 2017-05-10 20:45:36 -07:00
clocksource clocksource: arm_arch_timer: add structs to describe MMIO timer 2017-04-19 16:11:48 +01:00
crypto Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2017-05-03 08:50:52 -07:00
drm drm/dp: start a DPCD based DP sink/branch device quirk database 2017-05-29 13:43:26 +03:00
dt-bindings Sort of on the quieter side this time, which is probably due more 2017-05-10 13:38:18 -07:00
keys
kvm KVM: arm/arm64: Fix bug when registering redist iodevs 2017-05-18 11:18:12 +02:00
linux networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
math-emu
media [media] media/cec.h: use IS_REACHABLE instead of IS_ENABLED 2017-06-08 16:52:28 -03:00
memory
misc
net tls: kernel TLS support 2017-06-15 12:12:40 -04:00
pcmcia
ras
rdma RDMA/SA: Fix kernel panic in CMA request handler flow 2017-06-01 17:20:14 -04:00
rxrpc rxrpc: Implement service upgrade 2017-06-05 14:30:49 +01:00
scsi Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2017-05-12 11:44:13 -07:00
soc net/wan/fsl_ucc_hdlc: add hdlc-bus support 2017-05-18 10:28:39 -04:00
sound ASoC: Updates for v4.12 2017-05-02 08:25:25 +02:00
target iscsi-target: Fix initial login PDU asynchronous socket close OOPs 2017-05-31 15:12:31 -07:00
trace rxrpc: Add service upgrade support for client connections 2017-06-05 14:30:49 +01:00
uapi net: sched: act_tunnel_key: make UDP checksum configurable 2017-06-15 14:21:03 -04:00
video uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
xen xen: Implement EFI reset_system callback 2017-05-02 12:06:50 +02:00