Skip to contentSkip to conversation

filter: fix sparse warning for bpf_internal_load_pointer_neg_helper

PATCH In review Claudiu Ghioc 2 participants 2 messages Mar 3, 2013 – Mar 4, 2013

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 filter: fix sparse warning for bpf_internal_load_pointer_neg_helper

Removed the following sparse warning:
* net/core/filter.c:48:6: warning: symbol
'bpf_internal_load_pointer_neg_helper' was
not declared. Should it be static?

---
 net/core/filter.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/filter.c +1 -1
index 2e20b55..f6c907c 100644
@@ -45,7 +45,7 @@
  *
  * Exported for the bpf jit load helper.
  */
-void *bpf_internal_load_pointer_neg_helper(const struct sk_buff *skb, int k, unsigned int size)
+static void *bpf_internal_load_pointer_neg_helper(const struct sk_buff *skb, int k, unsigned int size)
 {
 	u8 *ptr = NULL;
 
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 15 lines · Claudiu Ghioc

Removed the following sparse warning:
* net/core/filter.c:48:6: warning: symbol
'bpf_internal_load_pointer_neg_helper' was
not declared. Should it be static?

---
 net/core/filter.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/filter.c +0 -0
index 2e20b55..f6c907c 100644

net/core/filter.c line 51

Quoted 8 lines
net/core/filter.c +1 -1
@@ -45,7 +45,7 @@
  *
  * Exported for the bpf jit load helper.
  */
-void *bpf_internal_load_pointer_neg_helper(const struct sk_buff *skb, int k, unsigned int size)
+static void *bpf_internal_load_pointer_neg_helper(const struct sk_buff *skb, int k, unsigned int size)
 {
 	u8 *ptr = NULL;
 

Hmm, have you read the comment ?

Also :