android_kernel_motorola_sm6225/net/core
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
..
datagram.c [NET]: Clean up sk_buff walkers. 2007-04-26 00:44:22 -07:00
dev.c [NET]: Warn about GSO/checksum abuse 2007-04-25 22:29:47 -07:00
dev_mcast.c [NET]: make seq_operations const 2007-04-25 22:25:03 -07:00
dst.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
ethtool.c [NET] core: whitespace cleanup 2007-04-25 22:24:09 -07:00
fib_rules.c [RTNETLINK]: Remove unnecessary locking in dump callbacks 2007-04-25 22:29:05 -07:00
filter.c [SK_BUFF]: Convert skb->tail to sk_buff_data_t 2007-04-25 22:26:28 -07:00
flow.c [IPSEC] flow: Fix potential memory leak 2007-01-23 20:25:39 -08:00
gen_estimator.c [NET] CORE: Fix whitespace errors. 2007-02-10 23:19:25 -08:00
gen_stats.c [SK_BUFF]: Convert skb->tail to sk_buff_data_t 2007-04-25 22:26:28 -07:00
iovec.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
kmap_skb.h [PATCH] severing skbuff.h -> highmem.h 2006-12-04 02:00:29 -05:00
link_watch.c [NET]: cleanup extra semicolons 2007-04-25 22:29:24 -07:00
Makefile [NET]: The scheduled removal of the frame diverter. 2006-12-02 21:22:23 -08:00
neighbour.c [NEIGH]: Use rtnl registration interface 2007-04-25 22:27:06 -07:00
net-sysfs.c [NET] core: whitespace cleanup 2007-04-25 22:24:09 -07:00
netevent.c [NET]: Network Event Notifier Mechanism. 2006-08-02 13:38:20 -07:00
netpoll.c [NET]: Treat CHECKSUM_PARTIAL as CHECKSUM_UNNECESSARY 2007-04-25 22:28:43 -07:00
pktgen.c [NET]: cleanup extra semicolons 2007-04-25 22:29:24 -07:00
request_sock.c [NET]: Size listen hash tables using backlog hint 2006-12-02 21:21:44 -08:00
rtnetlink.c [WIRELESS]: Remove wext over netlink. 2007-04-25 22:29:42 -07:00
scm.c [NET] CORE: Fix whitespace errors. 2007-02-10 23:19:25 -08:00
skbuff.c [NET]: Clean up sk_buff walkers. 2007-04-26 00:44:22 -07:00
sock.c [NET]: Move sk_setup_caps() out of line. 2007-04-25 22:29:26 -07:00
stream.c [NET] CORE: Fix whitespace errors. 2007-02-10 23:19:25 -08:00
sysctl_net_core.c [NET]: Replace CONFIG_NET_DEBUG with sysctl. 2007-04-25 22:24:05 -07:00
user_dma.c [NET]: Clean up sk_buff walkers. 2007-04-26 00:44:22 -07:00
utils.c [NET]: New sysctls should use __read_mostly tags 2007-04-25 22:24:19 -07:00
wireless.c [WIRELESS]: Remove wext over netlink. 2007-04-25 22:29:42 -07:00