]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[NET]: Remove gratuitous use of skb->tail in network drivers.
authorDavid S. Miller <davem@davemloft.net>
Tue, 28 Jun 2005 22:25:31 +0000 (15:25 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Jun 2005 22:25:31 +0000 (15:25 -0700)
commit689be43945e9ca7dd704522e55af1b8a73a994d3
tree6dcc7a5675a9a2b98c36ee54f2ba4386f84efe83
parentf835e471b557c45d2e5701ea5215f6e739b4eb39
[NET]: Remove gratuitous use of skb->tail in network drivers.

Many drivers use skb->tail unnecessarily.

In these situations, the code roughly looks like:

dev = dev_alloc_skb(...);

[optional] skb_reserve(skb, ...);

... skb->tail ...

But even if the skb_reserve() happens, skb->data equals
skb->tail.  So it doesn't make any sense to use anything
other than skb->data in these cases.

Another case was the s2io.c driver directly mucking with
the skb->data and skb->tail pointers.  It really just wanted
to do an skb_reserve(), so that's what the code was changed
to do instead.

Another reason I'm making this change as it allows some SKB
cleanups I have planned simpler to merge.  In those cleanups,
skb->head, skb->tail, and skb->end pointers are removed, and
replaced with skb->head_room and skb->tail_room integers.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
31 files changed:
drivers/net/3c515.c
drivers/net/3c59x.c
drivers/net/8139cp.c
drivers/net/82596.c
drivers/net/dl2k.c
drivers/net/eepro100.c
drivers/net/epic100.c
drivers/net/fealnx.c
drivers/net/hamachi.c
drivers/net/lance.c
drivers/net/lasi_82596.c
drivers/net/natsemi.c
drivers/net/ns83820.c
drivers/net/pcnet32.c
drivers/net/r8169.c
drivers/net/s2io.c
drivers/net/sb1250-mac.c
drivers/net/sis900.c
drivers/net/starfire.c
drivers/net/sundance.c
drivers/net/tulip/de2104x.c
drivers/net/tulip/dmfe.c
drivers/net/tulip/interrupt.c
drivers/net/tulip/tulip_core.c
drivers/net/tulip/winbond-840.c
drivers/net/tulip/xircom_tulip_cb.c
drivers/net/typhoon.c
drivers/net/via-rhine.c
drivers/net/via-velocity.c
drivers/net/wan/hdlc_cisco.c
drivers/net/yellowfin.c