1
0
Fork 0
alistair23-linux/drivers/media/dvb-core
Johannes Berg 4df864c1d9 networking: make skb_put & friends 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 (skb_put, __skb_put and pskb_put) 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_put, __skb_put };
    @@
    - *(fn(SKB, LEN))
    + *(u8 *)fn(SKB, LEN)

    @@
    expression E, SKB, LEN;
    identifier fn = { skb_put, __skb_put };
    type T;
    @@
    - E = ((T *)(fn(SKB, LEN)))
    + E = fn(SKB, LEN)

which actually doesn't cover pskb_put since there are only three
users overall.

A handful of stragglers were converted manually, notably a macro in
drivers/isdn/i4l/isdn_bsdcomp.c and, oddly enough, one of the many
instances in net/bluetooth/hci_sock.c. In the former file, I also
had to fix one whitespace problem spatch introduced.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-16 11:48:39 -04:00
..
Kconfig [media] Raise adapter number limit 2016-11-23 13:28:43 -02:00
Makefile [media] dvb-core: move dvb_filter out of the DVB core 2016-10-21 08:44:08 -02:00
demux.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dmxdev.c [media] media: dvb: dmx: fixed coding style issues of spacing 2017-02-03 11:35:10 -02:00
dmxdev.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dvb-usb-ids.h [media] add Hama Hybrid DVB-T Stick support 2017-02-08 10:54:58 -02:00
dvb_ca_en50221.c [media] media/dvb-core: Race condition when writing to CAM 2017-04-17 17:20:23 -03:00
dvb_ca_en50221.h [media] dvb_ca_en50221.h: Make checkpatch.pl happy 2015-10-06 18:40:01 -03:00
dvb_demux.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
dvb_demux.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dvb_frontend.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
dvb_frontend.h [media] docs-rst: media: better document refcount in struct dvb_frontend 2017-04-17 16:55:38 -03:00
dvb_math.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dvb_math.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dvb_net.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
dvb_net.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dvb_ringbuffer.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dvb_ringbuffer.h scripts/spelling.txt: add "an user" pattern and fix typo instances 2017-02-27 18:43:46 -08:00
dvbdev.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dvbdev.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00