Skip to contentSkip to conversation

mptcp: mib: fix sparse warnings

PATCH In review Florian Westphal 2 participants 2 messages Oct 9, 2019

Subsystems (2)
lore
Share & tools
lore

Florian Westphal

author
#0 lore raw

PATCH 1/1 mptcp: mib: fix sparse warnings

squashto: mptcp: add MIB counter infrastructure

get rid of:
mib.c:31:33: sparse: warning: incorrect type in initializer (different address spaces)
mib.c:31:33: sparse: expected struct mptcp_mib *mib
mib.c:31:33: sparse: got struct mptcp_mib [noderef] <asn:3> *
mib.c:36:13: sparse: warning: incorrect type in initializer (different address spaces)
mib.c:36:13: sparse: expected struct mptcp_mib [noderef] <asn:3> *__new
mib.c:36:13: sparse: got struct mptcp_mib *mib
mib.c:37:29: sparse: warning: incorrect type in argument 1 (different address spaces)
mib.c:37:29: sparse: expected void [noderef] <asn:3> *__pdata
mib.c:37:29: sparse: got struct mptcp_mib *mib
mib.c:42:6: sparse: warning: symbol 'mptcp_seq_show' was not declared. Should it be static?

Signed-off-by Florian Westphal <fw(a)strlen.de>
---
 net/mptcp/mib.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/mptcp/mib.c +2 -1
index 38f6e63335bf..4ab627e877d1 100644
@@ -2,6 +2,7 @@
 
 #include <linux/seq_file.h>
 #include <net/ip.h>
+#include <net/mptcp.h>
 #include <net/snmp.h>
 #include <net/net_namespace.h>
 
@@ -28,7 +29,7 @@ static const struct snmp_mib mptcp_snmp_list[] = {
  */
 bool mptcp_mib_alloc(struct net *net)
 {
-	struct mptcp_mib *mib = alloc_percpu(struct mptcp_mib);
+	struct mptcp_mib __percpu *mib = alloc_percpu(struct mptcp_mib);
 
 	if (!mib)
 		return false;
Signature · 1 line
2.21.0
#1 lore raw

Hi Florian,

Quoted 14 lines · Florian Westphal

squashto: mptcp: add MIB counter infrastructure

get rid of:
mib.c:31:33: sparse: warning: incorrect type in initializer (different address spaces)
mib.c:31:33: sparse: expected struct mptcp_mib *mib
mib.c:31:33: sparse: got struct mptcp_mib [noderef] <asn:3> *
mib.c:36:13: sparse: warning: incorrect type in initializer (different address spaces)
mib.c:36:13: sparse: expected struct mptcp_mib [noderef] <asn:3> *__new
mib.c:36:13: sparse: got struct mptcp_mib *mib
mib.c:37:29: sparse: warning: incorrect type in argument 1 (different address spaces)
mib.c:37:29: sparse: expected void [noderef] <asn:3> *__pdata
mib.c:37:29: sparse: got struct mptcp_mib *mib
mib.c:42:6: sparse: warning: symbol 'mptcp_seq_show' was not declared. Should it be static?

Quoted 1 line
Signed-off-by Florian Westphal <fw(a)strlen.de>

Thank you for having looked at that!

Looks good to me!

- a46ee3d7aafa: "squashed" in "mptcp: add MIB counter infrastructure"
- signed-off already there
- 8b829e9415cf..140091ac68c1: result

Tests are still OK.

Cheers,
Matt

Signature · 5 lines
Matthieu Baerts | R&D Engineer
matthieu.baerts(a)tessares.net
Tessares SA | Hybrid Access Solutions
www.tessares.net
1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium