* [PATCH] btrfs: make function update_share_count static
@ 2017-11-30 12:14 Colin King
2017-11-30 15:50 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-11-30 12:14 UTC (permalink / raw)
To: Chris Mason, Josef Bacik, David Sterba, linux-btrfs
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The function update_share_count is local to the source and does
not need to be in global scope, so make it static.
Cleans up sparse warning:
fs/btrfs/backref.c:219:6: warning: symbol 'update_share_count' was not
declared. Should it be static?
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
fs/btrfs/backref.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 7d0dc100a09a..e4054e533f6d 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -216,7 +216,8 @@ static int prelim_ref_compare(struct prelim_ref *ref1,
return 0;
}
-void update_share_count(struct share_check *sc, int oldcount, int newcount)
+static void update_share_count(struct share_check *sc, int oldcount,
+ int newcount)
{
if ((!sc) || (oldcount == 0 && newcount < 1))
return;
--
2.14.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs: make function update_share_count static
2017-11-30 12:14 [PATCH] btrfs: make function update_share_count static Colin King
@ 2017-11-30 15:50 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2017-11-30 15:50 UTC (permalink / raw)
To: Colin King
Cc: Chris Mason, Josef Bacik, David Sterba, linux-btrfs,
kernel-janitors, linux-kernel
On Thu, Nov 30, 2017 at 12:14:47PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The function update_share_count is local to the source and does
> not need to be in global scope, so make it static.
>
> Cleans up sparse warning:
> fs/btrfs/backref.c:219:6: warning: symbol 'update_share_count' was not
> declared. Should it be static?
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: David Sterba <dsterba@suse.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-30 15:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-30 12:14 [PATCH] btrfs: make function update_share_count static Colin King
2017-11-30 15:50 ` David Sterba
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).