kernel_optimize_test/net/batman-adv
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
..
bat_algo.c
bat_algo.h
bat_iv_ogm.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
bat_iv_ogm.h
bat_v_elp.c networking: convert many more places to skb_put_zero() 2017-06-16 11:48:35 -04:00
bat_v_elp.h
bat_v_ogm.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
bat_v_ogm.h
bat_v.c batman-adv: Replace a seq_puts() call by seq_putc() in two functions 2017-05-23 12:09:14 +02:00
bat_v.h
bitarray.c
bitarray.h
bridge_loop_avoidance.c batman-adv: Print correct function names in dbg messages 2017-05-23 14:34:31 +02:00
bridge_loop_avoidance.h batman-adv: prevent multiple ARP replies sent by gateways if dat enabled 2017-03-22 10:30:53 +01:00
debugfs.c
debugfs.h
distributed-arp-table.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
distributed-arp-table.h
fragmentation.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
fragmentation.h
gateway_client.c
gateway_client.h
gateway_common.c Here are two batman-adv bugfixes: 2017-03-16 12:05:38 -07:00
gateway_common.h
hard-interface.c
hard-interface.h
hash.c
hash.h
icmp_socket.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
icmp_socket.h
Kconfig
log.c
log.h batman-adv: Fix possible side-effects in _batadv_dbg 2017-03-16 21:14:52 +01:00
main.c batman-adv: restructure rebroadcast counter into forw_packet API 2017-03-26 12:46:44 +02:00
main.h batman-adv: decrease maximum fragment size 2017-05-23 12:09:13 +02:00
Makefile
multicast.c batman-adv: Reduce preprocessor checks in multicast.c 2017-03-16 21:14:50 +01:00
multicast.h
netlink.c
netlink.h
network-coding.c batman-adv: Combine two seq_puts() calls into one call in batadv_nc_nodes_seq_print_text() 2017-05-23 12:09:15 +02:00
network-coding.h
originator.c
originator.h
packet.h
routing.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-15 11:59:32 -04:00
routing.h
send.c batman-adv: Print correct function names in dbg messages 2017-05-23 14:34:31 +02:00
send.h batman-adv: restructure rebroadcast counter into forw_packet API 2017-03-26 12:46:44 +02:00
soft-interface.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
soft-interface.h
sysfs.c
sysfs.h
tp_meter.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
tp_meter.h
translation-table.c batman-adv: simplify return handling in some TT functions 2017-06-09 15:57:00 +02:00
translation-table.h
tvlv.c
tvlv.h
types.h This feature/cleanup patchset includes the following patches: 2017-04-06 14:37:50 -07:00