* [PATCH net-next ] net: Remove useless function skb_header_release
@ 2017-09-21 4:39 gfree.wind
2017-09-21 4:49 ` Joe Perches
2017-09-21 22:25 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: gfree.wind @ 2017-09-21 4:39 UTC (permalink / raw)
To: davem, netdev; +Cc: Gao Feng
From: Gao Feng <gfree.wind@vip.163.com>
There is no one which would invokes the function skb_header_release.
So just remove it now.
Signed-off-by: Gao Feng <gfree.wind@vip.163.com>
---
include/linux/skbuff.h | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 72299ef..ce632cd 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1457,22 +1457,6 @@ static inline int skb_header_unclone(struct sk_buff *skb, gfp_t pri)
}
/**
- * skb_header_release - release reference to header
- * @skb: buffer to operate on
- *
- * Drop a reference to the header part of the buffer. This is done
- * by acquiring a payload reference. You must not read from the header
- * part of skb->data after this.
- * Note : Check if you can use __skb_header_release() instead.
- */
-static inline void skb_header_release(struct sk_buff *skb)
-{
- BUG_ON(skb->nohdr);
- skb->nohdr = 1;
- atomic_add(1 << SKB_DATAREF_SHIFT, &skb_shinfo(skb)->dataref);
-}
-
-/**
* __skb_header_release - release reference to header
* @skb: buffer to operate on
*
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net-next ] net: Remove useless function skb_header_release
2017-09-21 4:39 [PATCH net-next ] net: Remove useless function skb_header_release gfree.wind
@ 2017-09-21 4:49 ` Joe Perches
2017-09-21 5:07 ` Gao Feng
2017-09-21 22:25 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Joe Perches @ 2017-09-21 4:49 UTC (permalink / raw)
To: gfree.wind, davem, netdev
On Thu, 2017-09-21 at 12:39 +0800, gfree.wind@vip.163.com wrote:
> From: Gao Feng <gfree.wind@vip.163.com>
>
> There is no one which would invokes the function skb_header_release.
> So just remove it now.
This in incomplete.
There are other references to this function.
$ git grep -w skb_header_release
drivers/net/usb/asix_common.c: * TCP packets for example are cloned, but skb_header_release()
include/linux/skbuff.h: * skb_header_release - release reference to header
include/linux/skbuff.h:static inline void skb_header_release(struct sk_buff *skb)
include/linux/skbuff.h: * Variant of skb_header_release() assuming skb is private to caller.
net/batman-adv/soft-interface.c: * data using skb_header_release in our skbs to allow skb_cow_header to
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re:Re: [PATCH net-next ] net: Remove useless function skb_header_release
2017-09-21 4:49 ` Joe Perches
@ 2017-09-21 5:07 ` Gao Feng
0 siblings, 0 replies; 4+ messages in thread
From: Gao Feng @ 2017-09-21 5:07 UTC (permalink / raw)
To: Joe Perches; +Cc: davem, netdev
>On Thu, 2017-09-21 at 12:39 +0800, gfree.wind@vip.163.com wrote:
>> From: Gao Feng <gfree.wind@vip.163.com>
>>
>> There is no one which would invokes the function skb_header_release.
>> So just remove it now.
>
>This in incomplete.
>There are other references to this function.
>
>$ git grep -w skb_header_release
>drivers/net/usb/asix_common.c: * TCP packets for example are cloned, but skb_header_release()
>include/linux/skbuff.h: * skb_header_release - release reference to header
>include/linux/skbuff.h:static inline void skb_header_release(struct sk_buff *skb)
>include/linux/skbuff.h: * Variant of skb_header_release() assuming skb is private to caller.
>net/batman-adv/soft-interface.c: * data using skb_header_release in our skbs to allow skb_cow_header to
But there are comments, not real codes.
Unless the skb_header_release may be used in the external modules
Best Regards
Feng
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next ] net: Remove useless function skb_header_release
2017-09-21 4:39 [PATCH net-next ] net: Remove useless function skb_header_release gfree.wind
2017-09-21 4:49 ` Joe Perches
@ 2017-09-21 22:25 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2017-09-21 22:25 UTC (permalink / raw)
To: gfree.wind; +Cc: netdev
From: gfree.wind@vip.163.com
Date: Thu, 21 Sep 2017 12:39:31 +0800
> From: Gao Feng <gfree.wind@vip.163.com>
>
> There is no one which would invokes the function skb_header_release.
> So just remove it now.
>
> Signed-off-by: Gao Feng <gfree.wind@vip.163.com>
As Joe Perches mentioned, there are comment references remaining.
This should be removed too because they can be confusing for people.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-09-21 22:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-21 4:39 [PATCH net-next ] net: Remove useless function skb_header_release gfree.wind
2017-09-21 4:49 ` Joe Perches
2017-09-21 5:07 ` Gao Feng
2017-09-21 22:25 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox