[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251122051021.19709-1-a0979625527@icloud.com>
Date: Sat, 22 Nov 2025 13:10:21 +0800
From: Chia-Liang Wang <wjliang627@...il.com>
To: edumazet@...gle.com,
kuniyu@...gle.com,
pabeni@...hat.com,
willemb@...gle.com,
davem@...emloft.net,
kuba@...nel.org
Cc: horms@...nel.org,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Chia-Liang Wang <a0979625527@...oud.com>
Subject: [PATCH] net: socket: add missing declaration for update_socket_protocol
When building with C=1, sparse reports the following warning:
net/socket.c:1735:21: warning: symbol 'update_socket_protocol' was not declared. Should it be static?
The function update_socket_protocol() is defined as __weak, intended
to be overwritten by architecture-specific implementations. Therefore,
it cannot be static.
Add a declaration in include/net/sock.h to fix this sparse warning.
Signed-off-by: Chia-Liang Wang <a0979625527@...oud.com>
---
include/net/sock.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/net/sock.h b/include/net/sock.h
index 60bcb13f045c..2081b6599edc 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -3103,4 +3103,6 @@ static inline bool sk_is_readable(struct sock *sk)
return false;
}
+
+int update_socket_protocol(int family, int type, int protocol);
#endif /* _SOCK_H */
--
2.43.0
Powered by blists - more mailing lists