[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200819141630.1338693-2-leon@kernel.org>
Date: Wed, 19 Aug 2020 17:16:28 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Chris Mason <clm@...com>, David Sterba <dsterba@...e.com>,
Josef Bacik <josef@...icpanda.com>
Cc: Leon Romanovsky <leonro@...dia.com>, linux-btrfs@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/3] fs/btfrs: Fix -Wunused-but-set-variable warnings
From: Leon Romanovsky <leonro@...dia.com>
The compilation with W=1 generates the following warnings:
fs/btrfs/sysfs.c:1630:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
1630 | int ret;
| ^~~
fs/btrfs/sysfs.c:1629:6: warning: variable 'features' set but not used [-Wunused-but-set-variable]
1629 | u64 features;
| ^~~~~~~~
Signed-off-by: Leon Romanovsky <leonro@...dia.com>
---
fs/btrfs/sysfs.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index c8df2edafd85..d3652bcc2a86 100644
--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
@@ -1626,13 +1626,12 @@ void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info,
{
struct btrfs_fs_devices *fs_devs;
struct kobject *fsid_kobj;
- u64 features;
- int ret;
+ int __maybe_unused ret;
if (!fs_info)
return;
- features = get_features(fs_info, set);
+ get_features(fs_info, set);
ASSERT(bit & supported_feature_masks[set]);
fs_devs = fs_info->fs_devices;
--
2.26.2
Powered by blists - more mailing lists