Skip to content

Commit

Permalink
btrfs: remove const from btrfs_feature_set_name
Browse files Browse the repository at this point in the history
The function btrfs_feature_set_name returns a const char pointer, the
second const is not necessary and reported as a warning:

 In file included from fs/btrfs/space-info.c:6:
 fs/btrfs/sysfs.h:16:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
    16 | const char * const btrfs_feature_set_name(enum btrfs_feature_set set);
       | ^~~~~

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
David Sterba committed Oct 7, 2020
1 parent e21139c commit 9e6df7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/btrfs/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ static const char * const btrfs_feature_set_names[FEAT_MAX] = {
[FEAT_INCOMPAT] = "incompat",
};

const char * const btrfs_feature_set_name(enum btrfs_feature_set set)
const char *btrfs_feature_set_name(enum btrfs_feature_set set)
{
return btrfs_feature_set_names[set];
}
Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/sysfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ enum btrfs_feature_set {
};

char *btrfs_printable_features(enum btrfs_feature_set set, u64 flags);
const char * const btrfs_feature_set_name(enum btrfs_feature_set set);
const char *btrfs_feature_set_name(enum btrfs_feature_set set);
int btrfs_sysfs_add_devices_dir(struct btrfs_fs_devices *fs_devices,
struct btrfs_device *one_device);
int btrfs_sysfs_remove_devices_dir(struct btrfs_fs_devices *fs_devices,
Expand Down

0 comments on commit 9e6df7c

Please sign in to comment.