diff options
author | Jeff Mahoney <jeffm@suse.com> | 2013-11-20 16:50:23 -0500 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-01-28 13:19:44 -0800 |
commit | 1b8e5df6d9b676f6d31fb098ffdc7d18732729d7 (patch) | |
tree | 80e54f4147fdb9c8c292f8daeda83a1ff99c6314 | |
parent | 131e404a2a54d30f894425ef723f9867a43bff4c (diff) | |
download | op-kernel-dev-1b8e5df6d9b676f6d31fb098ffdc7d18732729d7.zip op-kernel-dev-1b8e5df6d9b676f6d31fb098ffdc7d18732729d7.tar.gz |
btrfs: fix static checker warnings
This patch fixes the following warnings:
fs/btrfs/extent-tree.c:6201:12: sparse: symbol 'get_raid_name' was not declared. Should it be static?
fs/btrfs/extent-tree.c:8430:9: error: format not a string literal and no format arguments [-Werror=format-security] get_raid_name(index));
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
-rw-r--r-- | fs/btrfs/extent-tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index fe651f4..f08f6dd 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -6195,7 +6195,7 @@ static const char *btrfs_raid_type_names[BTRFS_NR_RAID_TYPES] = { [BTRFS_RAID_RAID6] = "raid6", }; -const char *get_raid_name(enum btrfs_raid_types type) +static const char *get_raid_name(enum btrfs_raid_types type) { if (type >= BTRFS_NR_RAID_TYPES) return NULL; @@ -8423,7 +8423,7 @@ static void __link_block_group(struct btrfs_space_info *space_info, kobject_get(&space_info->kobj); /* put in release */ ret = kobject_init_and_add(kobj, &btrfs_raid_ktype, - &space_info->kobj, + &space_info->kobj, "%s", get_raid_name(index)); if (ret) { pr_warn("btrfs: failed to add kobject for block cache. ignoring.\n"); |