android_kernel_xiaomi_sm8350/net
Jean Delvare eefa390628 [NET]: Clean up sk_buff walkers.
I noticed recently that, in skb_checksum(), "offset" and "start" are
essentially the same thing and have the same value throughout the
function, despite being computed differently. Using a single variable
allows some cleanups and makes the skb_checksum() function smaller,
more readable, and presumably marginally faster.

We appear to have many other "sk_buff walker" functions built on the
exact same model, so the cleanup applies to them, too. Here is a list
of the functions I found to be affected:

net/appletalk/ddp.c:atalk_sum_skb()
net/core/datagram.c:skb_copy_datagram_iovec()
net/core/datagram.c:skb_copy_and_csum_datagram()
net/core/skbuff.c:skb_copy_bits()
net/core/skbuff.c:skb_store_bits()
net/core/skbuff.c:skb_checksum()
net/core/skbuff.c:skb_copy_and_csum_bit()
net/core/user_dma.c:dma_skb_copy_datagram_iovec()
net/xfrm/xfrm_algo.c:skb_icv_walk()
net/xfrm/xfrm_algo.c:skb_to_sgvec()

OTOH, I admit I'm a bit surprised, the cleanup is rather obvious so I'm
really wondering if I am missing something. Can anyone please comment
on this?

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-26 00:44:22 -07:00
..
802 [NET]: cleanup extra semicolons 2007-04-25 22:29:24 -07:00
8021q [NET]: cleanup extra semicolons 2007-04-25 22:29:24 -07:00
appletalk [NET]: Clean up sk_buff walkers. 2007-04-26 00:44:22 -07:00
atm [SK_BUFF]: Introduce skb_copy_to_linear_data{_offset} 2007-04-25 22:28:29 -07:00
ax25 [NET]: cleanup extra semicolons 2007-04-25 22:29:24 -07:00
bluetooth [NET]: cleanup extra semicolons 2007-04-25 22:29:24 -07:00
bridge [BRIDGE]: Missing rtnl. 2007-04-25 22:30:04 -07:00
core [NET]: Clean up sk_buff walkers. 2007-04-26 00:44:22 -07:00
dccp [DCCP]: Debug statements for Elapsed Time option 2007-04-25 22:28:55 -07:00
decnet [RTNETLINK]: Remove unnecessary locking in dump callbacks 2007-04-25 22:29:05 -07:00
econet [SK_BUFF]: Convert skb->tail to sk_buff_data_t 2007-04-25 22:26:28 -07:00
ethernet [SK_BUFF]: Introduce skb_reset_mac_header(skb) 2007-04-25 22:24:32 -07:00
ieee80211 [WIRELESS]: Refactor wireless Kconfig. 2007-04-25 22:29:40 -07:00
ipv4 [IPV4] IP_GRE: Unify code path to get hash array index. 2007-04-25 22:29:56 -07:00
ipv6 [IPV6] NDISC: Unify main process of sending ND messages. 2007-04-25 22:29:59 -07:00
ipx [SK_BUFF]: Introduce skb_reset_transport_header(skb) 2007-04-25 22:25:15 -07:00
irda [IrDA]: Misc spelling corrections. 2007-04-25 22:29:32 -07:00
iucv [NET]: cleanup extra semicolons 2007-04-25 22:29:24 -07:00
key [NET]: cleanup extra semicolons 2007-04-25 22:29:24 -07:00
lapb [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
llc [SK_BUFF]: unions of just one member don't get anything done, kill them 2007-04-25 22:26:20 -07:00
netfilter [NETLINK]: Switch cb_lock spinlock to mutex and allow to override it 2007-04-25 22:29:03 -07:00
netlabel [NET]: Fix kfree(skb) 2007-02-28 09:42:14 -08:00
netlink [NETLINK]: don't reinitialize callback mutex 2007-04-25 22:29:06 -07:00
netrom [AX25/NETROM/ROSE]: Convert to use modern wait queue API 2007-04-25 22:29:15 -07:00
packet [AF_PACKET]: Add option to return orig_dev to userspace. 2007-04-25 22:29:14 -07:00
rose [AX25/NETROM/ROSE]: Convert to use modern wait queue API 2007-04-25 22:29:15 -07:00
rxrpc [SK_BUFF]: Introduce udp_hdr(), remove skb->h.uh 2007-04-25 22:25:22 -07:00
sched [NET]: cleanup extra semicolons 2007-04-25 22:29:24 -07:00
sctp [NET]: cleanup extra semicolons 2007-04-25 22:29:24 -07:00
sunrpc [NET]: Treat CHECKSUM_PARTIAL as CHECKSUM_UNNECESSARY 2007-04-25 22:28:43 -07:00
tipc [TIPC]: Enhancements to msg_set_bits() routine 2007-04-25 22:29:49 -07:00
unix [SK_BUFF]: Introduce skb_reset_transport_header(skb) 2007-04-25 22:25:15 -07:00
wanrouter [SK_BUFF]: Introduce skb_copy_to_linear_data{_offset} 2007-04-25 22:28:29 -07:00
wireless [WIRELESS]: Remove wext over netlink. 2007-04-25 22:29:42 -07:00
x25 [SK_BUFF]: Some more conversions to skb_copy_from_linear_data 2007-04-25 22:28:30 -07:00
xfrm [NET]: Clean up sk_buff walkers. 2007-04-26 00:44:22 -07:00
compat.c [NET]: Adding SO_TIMESTAMPNS / SCM_TIMESTAMPNS support 2007-04-25 22:24:21 -07:00
Kconfig [WIRELESS]: Refactor wireless Kconfig. 2007-04-25 22:29:40 -07:00
Makefile [WIRELESS]: Refactor wireless Kconfig. 2007-04-25 22:29:40 -07:00
nonet.c
socket.c [SOCKET]: Export __sock_recv_timestamp 2007-04-25 22:24:22 -07:00
sysctl_net.c
TUNABLE