1
0
Fork 0
remarkable-linux/drivers/isdn/i4l
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 isdn: i4l: move active-isdn drivers to staging 2016-03-05 15:00:38 -08:00
Makefile ISDN: Make isdnhdlc usable for other ISDN drivers 2009-07-25 20:15:21 +02:00
isdn_audio.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
isdn_audio.h
isdn_bsdcomp.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
isdn_common.c isdn: replace del_timer by del_timer_sync 2014-03-27 15:28:06 -04:00
isdn_common.h TTY: switch tty_insert_flip_string 2013-01-15 22:22:35 -08:00
isdn_concap.c isdn: use designated initializers 2016-12-17 11:56:57 -05:00
isdn_concap.h isdn: whitespace coding style cleanup 2012-02-21 09:04:01 -08:00
isdn_net.c treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
isdn_net.h isdn: whitespace coding style cleanup 2012-02-21 09:04:01 -08:00
isdn_ppp.c networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
isdn_ppp.h isdn: whitespace coding style cleanup 2012-02-21 09:04:01 -08:00
isdn_tty.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
isdn_tty.h isdn: whitespace coding style cleanup 2012-02-21 09:04:01 -08:00
isdn_ttyfax.c isdn: whitespace coding style cleanup 2012-02-21 09:04:01 -08:00
isdn_ttyfax.h isdn: whitespace coding style cleanup 2012-02-21 09:04:01 -08:00
isdn_v110.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
isdn_v110.h isdn: whitespace coding style cleanup 2012-02-21 09:04:01 -08:00
isdn_x25iface.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
isdn_x25iface.h wanrouter: completely decouple obsolete code from kernel. 2013-01-31 19:20:33 -05:00
isdnhdlc.c isdn: whitespace coding style cleanup 2012-02-21 09:04:01 -08:00