Skip to contentSkip to conversation

devlink: make functions a couple of new functions static

PATCH Applied Colin King 3 participants 3 messages Jan 17, 2018 – Jan 19, 2018

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 devlink: make functions a couple of new functions static

From: Colin Ian King <[email protected]>

The functions devlink_resource_find and devlink_resource_validate_children are local to the source and do not need to be in global scope, so make them static.

Cleans up sparse warnings:
symbol 'devlink_resource_find' was not declared. Should it be static?
warning: symbol 'devlink_resource_validate_children' was not declared. Should it be static?

---
 net/core/devlink.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
net/core/devlink.c +3 -2
index dd7d6dd07bfb..66d36705fb9d 100644
@@ -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 @@ devlink_resource_find(struct devlink *devlink,
 	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;
Signature · 1 line
2.15.1
#1 lore raw
Quoted 6 lines · Wed, Jan 17, 2018 at 12:23:03PM CET, [email protected] wrote:

From: Colin Ian King <[email protected]>

The functions devlink_resource_find and devlink_resource_validate_children are local to the source and do not need to be in global scope, so make them static.

Quoted 6 lines

Cleans up sparse warnings:
symbol 'devlink_resource_find' was not declared. Should it be static?
warning: symbol 'devlink_resource_validate_children' was not declared. Should it be static?

This is already submitted here:
http://patchwork.ozlabs.org/patch/862020/

maintainer Applied
#2 lore raw
In reply to Colin King

From: Colin King <[email protected]>
Date: Wed, 17 Jan 2018 11:23:03 +0000

Quoted 6 lines

From: Colin Ian King <[email protected]>

The functions devlink_resource_find and devlink_resource_validate_children are local to the source and do not need to be in global scope, so make them static.

Quoted 6 lines

Cleans up sparse warnings:
symbol 'devlink_resource_find' was not declared. Should it be static?
warning: symbol 'devlink_resource_validate_children' was not declared. Should it be static?

Applied.