net: always declare __sock_wfree() and tcp_wfree()
Subsystems (3)
PATCH 1/1 net: always declare __sock_wfree() and tcp_wfree()
Even if guarded by IS_ENABLED(CONFIG_INET) compilers need to know what __sock_wfree() and tcp_wfree() are:
include/net/sock.h:1861:63: note: each undeclared identifier is reported only once for each function it appears in include/net/sock.h:1862:63: error: 'tcp_wfree' undeclared (first use in this function); did you mean 'sock_wfree'?
1862 | (IS_ENABLED(CONFIG_INET) && skb->destructor == tcp_wfree);
--- include/net/sock.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
include/net/sock.h +1 -2
@@ -1851,10 +1851,9 @@ static inline struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priostruct sk_buff *sock_wmalloc (struct sock *sk,unsigned long size,int force,gfp_t priority);void sock_wfree (struct sk_buff *skb); -#ifdef CONFIG_INET void __sock_wfree (struct sk_buff *skb);void tcp_wfree (struct sk_buff *skb); -#endif +static inline bool is_skb_wmem (const struct sk_buff *skb) { return skb->destructor == sock_wfree ||
Signature · 1 line
2.54.0.563.g4f69b47b94-goog
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Thu, 14 May 2026 09:55:06 +0000 you wrote:
Even if guarded by
IS_ENABLED(CONFIG_INET)compilers need to know what__sock_wfree()andtcp_wfree()are:
include/net/sock.h:1861:63: note: each undeclared identifier is reported only once for each function it appears ininclude/net/sock.h:1862:63: error: 'tcp_wfree' undeclared (first use in this function); did you mean 'sock_wfree'?1862 | (IS_ENABLED(CONFIG_INET) && skb->destructor == tcp_wfree);[...]
Here is the summary with links:
- [net-next] net: always declare __sock_wfree() and tcp_wfree()
https://git.kernel.org/netdev/net-next/c/e758acedce4e
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html