linux/net/ipv4/netfilter
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
Makefile
arp_tables.c netfilter: Remove unnecessary cast on void pointer 2017-04-07 17:29:17 +02:00
arpt_mangle.c
arptable_filter.c
ip_tables.c netfilter: Remove unnecessary cast on void pointer 2017-04-07 17:29:17 +02:00
ipt_CLUSTERIP.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-15 21:16:30 -04:00
ipt_ECN.c
ipt_MASQUERADE.c netfilter: nat: add dependencies on conntrack module 2016-12-04 21:16:51 +01:00
ipt_REJECT.c
ipt_SYNPROXY.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
ipt_ah.c
ipt_rpfilter.c netfilter: rpfilter: fix incorrect loopback packet judgment 2017-01-16 14:23:01 +01:00
iptable_filter.c
iptable_mangle.c
iptable_nat.c
iptable_raw.c
iptable_security.c
nf_conntrack_l3proto_ipv4.c netfilter: don't track fragmented packets 2017-03-08 18:02:12 +01:00
nf_conntrack_proto_icmp.c netfilter: add and use nf_ct_set helper 2017-02-02 14:31:54 +01:00
nf_defrag_ipv4.c skbuff: add and use skb_nfct helper 2017-02-02 14:31:53 +01:00
nf_dup_ipv4.c netfilter: kill the fake untracked conntrack objects 2017-04-15 11:47:57 +02:00
nf_log_arp.c lib/vsprintf.c: remove %Z support 2017-02-27 18:43:47 -08:00
nf_log_ipv4.c netfilter: allow logging from non-init namespaces 2017-02-02 14:31:58 +01:00
nf_nat_h323.c
nf_nat_l3proto_ipv4.c netfilter: don't attach a nat extension by default 2017-04-26 09:30:22 +02:00
nf_nat_masquerade_ipv4.c netfilter: masquerade: attach nat extension if not present 2017-04-26 09:30:22 +02:00
nf_nat_pptp.c netfilter: pptp: attach nat extension when needed 2017-04-26 09:30:22 +02:00
nf_nat_proto_gre.c
nf_nat_proto_icmp.c
nf_nat_snmp_basic.c netfilter: snmp: avoid stack size warning 2017-05-01 11:43:58 +02:00
nf_reject_ipv4.c networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
nf_socket_ipv4.c netfilter: remove nf_ct_is_untracked 2017-04-15 11:51:33 +02:00
nf_tables_arp.c
nf_tables_ipv4.c
nft_chain_nat_ipv4.c
nft_chain_route_ipv4.c
nft_dup_ipv4.c
nft_fib_ipv4.c netfilter: Remove exceptional & on function name 2017-04-07 18:24:47 +02:00
nft_masq_ipv4.c netfilter: nf_tables: fix mismatch in big-endian system 2017-03-13 13:30:28 +01:00
nft_redir_ipv4.c netfilter: nf_tables: fix mismatch in big-endian system 2017-03-13 13:30:28 +01:00
nft_reject_ipv4.c