[PATCH net-next] devlink: Make some functions static

Subsystems: networking [general], the rest

STALE3130d

3 messages, 3 authors, 2018-01-19 · open the first message on its own page

[PATCH net-next] devlink: Make some functions static

From: Wei Yongjun <hidden>
Date: 2018-01-17 03:27:42

Fixes the following sparse warnings:

net/core/devlink.c:2297:25: warning:
 symbol 'devlink_resource_find' was not declared. Should it be static?
net/core/devlink.c:2322:6: warning:
 symbol 'devlink_resource_validate_children' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <redacted>
---
 net/core/devlink.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/core/devlink.c b/net/core/devlink.c
index dd7d6dd..66d3670 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -2294,7 +2294,7 @@ static int devlink_nl_cmd_dpipe_table_counters_set(struct sk_buff *skb,
 						counters_enable);
 }
 
-struct devlink_resource *
+static struct devlink_resource *
 devlink_resource_find(struct devlink *devlink,
 		      struct devlink_resource *resource, u64 resource_id)
 {
@@ -2319,7 +2319,8 @@ struct devlink_resource *
 	return NULL;
 }
 
-void devlink_resource_validate_children(struct devlink_resource *resource)
+static void
+devlink_resource_validate_children(struct devlink_resource *resource)
 {
 	struct devlink_resource *child_resource;
 	bool size_valid = true;

Re: [PATCH net-next] devlink: Make some functions static

From: Jiri Pirko <jiri@resnulli.us>
Date: 2018-01-17 15:32:36

Wed, Jan 17, 2018 at 04:27:42AM CET, weiyongjun1@huawei.com wrote:
Fixes the following sparse warnings:

net/core/devlink.c:2297:25: warning:
symbol 'devlink_resource_find' was not declared. Should it be static?
net/core/devlink.c:2322:6: warning:
symbol 'devlink_resource_validate_children' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <redacted>
Acked-by: Jiri Pirko <redacted>

Re: [PATCH net-next] devlink: Make some functions static

From: David Miller <davem@davemloft.net>
Date: 2018-01-19 19:52:38

From: Wei Yongjun <redacted>
Date: Wed, 17 Jan 2018 03:27:42 +0000
Fixes the following sparse warnings:

net/core/devlink.c:2297:25: warning:
 symbol 'devlink_resource_find' was not declared. Should it be static?
net/core/devlink.c:2322:6: warning:
 symbol 'devlink_resource_validate_children' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help