diff mbox

btrfs: make function update_share_count static

Message ID 20171130121447.5118-1-colin.king@canonical.com (mailing list archive)
State New, archived
Headers show

Commit Message

Colin King Nov. 30, 2017, 12:14 p.m. UTC
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(-)

Comments

David Sterba Nov. 30, 2017, 3:50 p.m. UTC | #1
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>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;