[linux-next:master 4720/12950] net/core/dst_cache.c:31:6: sparse: symbol 'dst_cache_per_cpu_dst_set' was not declared. Should it be static?

3 messages, 2 authors, 2016-03-18 · open the first message on its own page

[linux-next:master 4720/12950] net/core/dst_cache.c:31:6: sparse: symbol 'dst_cache_per_cpu_dst_set' was not declared. Should it be static?

From: kbuild test robot <hidden>
Date: 2016-03-18 15:29:04

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   5e3497cca281616e7930b74a0076b7324dcc2057
commit: 607f725f6f7d5ec3759fbc16224afb60e2152a5b [4720/12950] net: replace dst_cache ip6_tunnel implementation with the generic one
reproduce:
        # apt-get install sparse
        git checkout 607f725f6f7d5ec3759fbc16224afb60e2152a5b
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)
quoted
net/core/dst_cache.c:31:6: sparse: symbol 'dst_cache_per_cpu_dst_set' was not declared. Should it be static?
net/core/dst_cache.c:42:18: sparse: symbol 'dst_cache_per_cpu_get' was not declared. Should it be static?
Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[RFC PATCH linux-next] net: dst_cache_per_cpu_dst_set() can be static

From: kbuild test robot <hidden>
Date: 2016-03-18 15:28:49

Signed-off-by: Fengguang Wu <redacted>
---
 dst_cache.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/core/dst_cache.c b/net/core/dst_cache.c
index 3938f3f..554d364 100644
--- a/net/core/dst_cache.c
+++ b/net/core/dst_cache.c
@@ -28,8 +28,8 @@ struct dst_cache_pcpu {
 	};
 };
 
-void dst_cache_per_cpu_dst_set(struct dst_cache_pcpu *dst_cache,
-			       struct dst_entry *dst, u32 cookie)
+static void dst_cache_per_cpu_dst_set(struct dst_cache_pcpu *dst_cache,
+				      struct dst_entry *dst, u32 cookie)
 {
 	dst_release(dst_cache->dst);
 	if (dst)
@@ -39,8 +39,8 @@ void dst_cache_per_cpu_dst_set(struct dst_cache_pcpu *dst_cache,
 	dst_cache->dst = dst;
 }
 
-struct dst_entry *dst_cache_per_cpu_get(struct dst_cache *dst_cache,
-					struct dst_cache_pcpu *idst)
+static struct dst_entry *dst_cache_per_cpu_get(struct dst_cache *dst_cache,
+					       struct dst_cache_pcpu *idst)
 {
 	struct dst_entry *dst;
 

Re: [RFC PATCH linux-next] net: dst_cache_per_cpu_dst_set() can be static

From: David Miller <davem@davemloft.net>
Date: 2016-03-18 21:45:35

From: kbuild test robot <redacted>
Date: Fri, 18 Mar 2016 23:27:28 +0800
Signed-off-by: Fengguang Wu <redacted>
Looks good, applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help