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
..
2017-02-24 17:46:57 -08:00
2015-11-23 09:44:58 +01:00
2017-03-30 09:37:20 +02:00
2011-10-29 21:20:22 +02:00
2016-02-29 09:35:20 +01:00
2017-02-24 17:46:57 -08:00
2017-05-09 15:40:28 -07:00
2017-01-24 12:23:35 -05:00
2017-01-24 12:23:35 -05:00
2014-04-30 19:49:37 +01:00
2017-02-24 17:46:57 -08:00
2017-02-13 21:44:10 -05:00
2014-05-05 09:09:14 +02:00
2016-05-23 17:04:14 -07:00
2014-08-08 15:57:25 -07:00
2012-07-30 17:25:16 -07:00
2014-06-25 17:45:43 -07:00
2016-12-06 10:17:03 +02:00
2015-09-08 14:35:59 -07:00
2017-02-24 17:46:57 -08:00
2015-03-23 22:12:08 -04:00
2017-05-04 18:03:51 -07:00
2016-05-30 15:26:57 -07:00
2016-08-02 17:31:41 -04:00
2017-03-28 18:22:11 -04:00