1
0
Fork 0
remarkable-linux/drivers/staging
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
..
android staging/android/ion: remove useless document file 2017-05-15 11:17:31 +02:00
board
ccree staging: ccree: fix buffer copy 2017-06-06 16:23:27 +02:00
clocking-wizard staging: clocking-wizard: Fix incorrect type of speed grade 2016-10-25 09:54:32 +02:00
comedi staging: comedi: addi_apci_3xxx: check return value 2017-04-25 20:43:42 +02:00
dgnc staging: dgnc: remove error message task 2017-03-29 09:37:10 +02:00
emxx_udc staging: emxx_udc: Add comment for spinlock_t definition. 2017-03-09 14:13:51 +01:00
fbtft staging: fbtft: fix open parentheses alignment 2017-04-28 12:07:25 +02:00
fsl-dpaa2 staging: fsl-dpaa2/eth: add ETHERNET dependency 2017-05-16 14:23:31 +02:00
fsl-mc staging: fsl-mc/dpio: add cpu <--> LE conversion for dpaa2_fd 2017-04-28 17:51:54 +02:00
fwserial Staging: fwserial: remove unused function fill_unplug_req 2016-10-16 10:25:09 +02:00
gdm724x networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
goldfish Staging: goldfish: use __func__ instead of embedded function names 2017-03-17 15:19:09 +09:00
greybus staging: greybus: uart.c: Remove include linux/serial.h 2017-04-18 13:27:16 +02:00
gs_fpgaboot scripts/spelling.txt: add "followings" pattern and fix typo instances 2017-02-27 18:43:47 -08:00
iio Staging: iio: accel: adis16203: fixed a brace coding style issue 2017-04-14 16:13:34 +01:00
ks7010 networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
lustre staging/lustre/lov: remove set_fs() call from lov_getstripe() 2017-06-03 17:17:19 +09:00
media [media] atomisp: don't treat warnings as errors 2017-06-04 15:23:32 -03:00
most networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
mt29f_spinand
netlogic net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
nvec Staging: nvec: Remove FSF's mailing address 2017-04-08 12:55:25 +02:00
octeon networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
octeon-usb
olpc_dcon staging: olpc_dcon: style fixes 2017-04-28 12:07:24 +02:00
rtl8188eu networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
rtl8192e networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
rtl8192u networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
rtl8712 networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
rtl8723bs networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
rts5208 staging: rts5208: ms.c fixed checkpatch warning - using __func__ instead of hardcoded name 2017-04-08 17:05:59 +02:00
skein staging: skein: fix checkpatch block comments warning 2017-01-20 14:39:12 +01:00
sm750fb staging: sm750fb: removed line continuations in quoted strings 2017-04-08 17:00:52 +02:00
speakup Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
typec staging: typec: fusb302: refactor resume retry mechanism 2017-05-16 14:23:31 +02:00
unisys staging: unisys: visorhba: fix s-Par to boot with option CONFIG_VMAP_STACK set to y 2017-04-28 11:55:53 +02:00
vc04_services staging: vc04_services: Fix bulk cache maintenance 2017-05-15 11:48:44 +02:00
vme Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
vt6655 Staging: vt6655 - block comments style fix 2017-03-29 09:39:08 +02:00
vt6656 staging: vt6656: use tabs instead of spaces 2017-04-28 14:30:43 +02:00
wilc1000 networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
wlan-ng networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
xgifb staging: xgifb: added blankline after decl. 2017-04-08 17:05:59 +02:00
Kconfig Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00
Makefile Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00