1
0
Fork 0
remarkable-linux/drivers/net/wireless/ath/wil6210
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 wil6210: dump firmware memory when firmware crashes 2015-10-09 11:39:19 +03:00
Makefile Makefile: drop -D__CHECK_ENDIAN__ from cflags 2016-12-16 00:13:43 +02:00
boot_loader.h wil6210: report boot loader error 2015-08-06 09:44:02 +03:00
cfg80211.c wireless-drivers-next patches for 4.12 2017-04-24 12:25:01 -04:00
debug.c wil6210: align wil log functions to wil_dbg_ratelimited implementation 2016-05-28 11:19:29 +03:00
debugfs.c wil6210: use memdup_user 2017-05-19 10:53:06 +03:00
ethtool.c wil6210: remove __func__ from debug printouts 2017-01-27 19:49:30 +02:00
fw.c wil6210: support loading dedicated image for sparrow-plus devices 2017-01-27 19:49:26 +02:00
fw.h wil6210: extract firmware version from file header 2016-08-31 10:31:16 +03:00
fw_inc.c wil6210: fix check for sparrow D0 FW file 2017-04-13 15:46:07 +03:00
interrupt.c wil6210: remove __func__ from debug printouts 2017-01-27 19:49:30 +02:00
ioctl.c wil6210: clean ioctl debug message 2016-03-07 11:43:20 +02:00
main.c wil6210: remove HALP voting in debugfs ioblob 2017-04-13 15:46:17 +03:00
netdev.c wireless-drivers-next patches for 4.11 2017-02-01 12:46:17 -05:00
p2p.c wil6210: remove __func__ from debug printouts 2017-01-27 19:49:30 +02:00
pcie_bus.c wil6210: set dma mask to reflect device capability 2017-03-09 10:04:00 +02:00
pm.c wil6210: prevent access to 11AD device if resume fails 2017-04-13 15:46:26 +03:00
pmc.c wil6210: fix array out of bounds access in pmc 2017-04-13 15:46:21 +03:00
pmc.h wil6210: Add pmc debug mechanism memory management 2015-05-04 20:55:43 +03:00
rx_reorder.c wil6210: support 8KB RX buffers 2017-04-13 15:45:48 +03:00
trace.c wil6210: trace support 2013-05-22 15:08:27 -04:00
trace.h wil6210: switch to generated wmi.h 2016-03-07 11:43:20 +02:00
txrx.c wil6210: support 8KB RX buffers 2017-04-13 15:45:48 +03:00
txrx.h wil6210: replay attack detection 2016-03-07 11:43:19 +02:00
wil6210.h wil6210: prevent access to 11AD device if resume fails 2017-04-13 15:46:26 +03:00
wil_crash_dump.c wil6210: remove __func__ from debug printouts 2017-01-27 19:49:30 +02:00
wil_platform.c wil6210: support for platform specific crash recovery 2016-01-07 15:00:44 +02:00
wil_platform.h wil6210: add pm_notify handling 2016-05-28 11:19:25 +03:00
wmi.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
wmi.h wil6210: align to latest auto generated wmi.h 2017-04-13 15:45:53 +03:00