devlink: make functions a couple of new functions static
Subsystems (3)
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
@@ -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
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_findanddevlink_resource_validate_childrenare 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?Signed-off-by Colin Ian King <[email protected]>
This is already submitted here:
http://patchwork.ozlabs.org/patch/862020/
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_findanddevlink_resource_validate_childrenare 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?Signed-off-by Colin Ian King <[email protected]>
Applied.