1
0
Fork 0
remarkable-linux/drivers/net/can
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
..
c_can drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
cc770 Annotate hardware config module parameters in drivers/net/can/ 2017-04-20 12:02:32 +01:00
ifi_canfd can: ifi: use correct register to read rx status 2017-04-04 17:48:22 +02:00
m_can can: m_can: add deep Suspend/Resume support 2017-05-18 10:32:48 +02:00
mscan treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
peak_canfd can: peak_canfd: fix uninitialized symbol warnings 2017-06-09 11:39:23 +02:00
rcar scripts/spelling.txt: add regsiter -> register spelling mistake 2017-05-08 17:15:13 -07:00
sja1000 Annotate hardware config module parameters in drivers/net/can/ 2017-04-20 12:02:32 +01:00
softing 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
spi can: hi311x: Add Holt HI-311x CAN driver 2017-04-04 17:35:59 +02:00
usb can: gs_usb: fix memory leak in gs_cmd_reset() 2017-06-09 11:39:23 +02:00
Kconfig can: add Virtual CAN Tunnel driver (vxcan) 2017-04-25 09:04:30 +02:00
Makefile can: add Virtual CAN Tunnel driver (vxcan) 2017-04-25 09:04:30 +02:00
at91_can.c drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
bfin_can.c can: remove obsolete assignment for CAN protocol error type 2015-11-23 09:37:38 +01:00
dev.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
flexcan.c can: flexcan: fix typo in comment 2017-03-03 13:00:07 +01:00
grcan.c docs: fix locations of several documents that got moved 2016-10-24 08:12:35 -02:00
janz-ican3.c drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
led.c can: add combined rx/tx LED trigger support 2015-03-22 23:50:11 +01:00
pch_can.c can: fix assignment of error location in CAN error messages 2015-11-23 09:37:34 +01:00
rx-offload.c can: rx-offload: Add support for timestamp based irq offloading 2017-02-06 15:13:24 +01:00
slcan.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
sun4i_can.c can: remove obsolete assignment for CAN protocol error type 2015-11-23 09:37:38 +01:00
ti_hecc.c can: ti_hecc: fix return value check in ti_hecc_probe() 2017-04-25 10:03:40 +02:00
vcan.c can: enable CAN FD for virtual CAN devices by default 2017-06-09 14:39:02 +02:00
vxcan.c can: enable CAN FD for virtual CAN devices by default 2017-06-09 14:39:02 +02:00
xilinx_can.c drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00