From: David Sterba Date: Mon, 17 Aug 2020 08:56:00 +0000 (+0200) Subject: btrfs: remove const from btrfs_feature_set_name X-Git-Tag: v5.15~2344^2~156 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e6df7cedfdf3e2469aa46fb772ca70b422132ec;p=platform%2Fkernel%2Flinux-starfive.git btrfs: remove const from btrfs_feature_set_name 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 Signed-off-by: David Sterba --- diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index d7c58c8..fcc8757 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -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]; } diff --git a/fs/btrfs/sysfs.h b/fs/btrfs/sysfs.h index c9efa15..4217823 100644 --- a/fs/btrfs/sysfs.h +++ b/fs/btrfs/sysfs.h @@ -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,