From: Colin King <colin.king@canonical.com>
To: Jiri Pirko <jiri@mellanox.com>,
"David S . Miller" <davem@davemloft.net>,
netdev@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH][devlink-next] devlink: make functions a couple of new functions static
Date: Wed, 17 Jan 2018 11:23:03 +0000 [thread overview]
Message-ID: <20180117112303.20149-1-colin.king@canonical.com> (raw)
From: Colin Ian King <colin.king@canonical.com>
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?
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
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 dd7d6dd07bfb..66d36705fb9d 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 @@ 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;
--
2.15.1
next reply other threads:[~2018-01-17 11:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-17 11:23 Colin King [this message]
2018-01-17 15:35 ` [PATCH][devlink-next] devlink: make functions a couple of new functions static Jiri Pirko
2018-01-19 19:36 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180117112303.20149-1-colin.king@canonical.com \
--to=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=jiri@mellanox.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).