summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2026-05-14 09:55:06 +0000
committerJakub Kicinski <kuba@kernel.org>2026-05-15 17:39:39 -0700
commite758acedce4e344e6ce290b4a422bb695dc53117 (patch)
tree181d1f55bd3ac1174aaf75f1c018cacb50249c6e /include
parent85ee970039f8f2a8911bf7efcd228cbc471fd38e (diff)
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); Fixes: f0de88303d5e ("net: make is_skb_wmem() available to modules") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202605141607.mDXnYFKY-lkp@intel.com/ Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20260514095506.3919094-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/sock.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 219917959b54..e0263bae8da9 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1851,10 +1851,9 @@ static inline struct sock *sk_clone_lock(const struct sock *sk, const gfp_t prio
struct 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 ||