From: Leon Romanovsky <leon@kernel.org>
To: Chris Mason <clm@fb.com>, David Sterba <dsterba@suse.com>,
Josef Bacik <josef@toxicpanda.com>
Cc: Leon Romanovsky <leonro@nvidia.com>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] fs/btfrs: Fix -Wunused-but-set-variable warnings
Date: Wed, 19 Aug 2020 17:16:28 +0300 [thread overview]
Message-ID: <20200819141630.1338693-2-leon@kernel.org> (raw)
In-Reply-To: <20200819141630.1338693-1-leon@kernel.org>
From: Leon Romanovsky <leonro@nvidia.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@nvidia.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
next prev parent reply other threads:[~2020-08-19 14:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-19 14:16 [PATCH 0/3] Fixes to GCC warnings while compiling with W=1 level Leon Romanovsky
2020-08-19 14:16 ` Leon Romanovsky [this message]
2020-08-19 14:16 ` [PATCH 2/3] fs/btrfs: Fix -Wignored-qualifiers warnings Leon Romanovsky
2020-08-19 14:16 ` [PATCH 3/3] fs/btrfs: Fix -Wmissing-prototypes warnings Leon Romanovsky
2020-08-19 14:21 ` [PATCH 0/3] Fixes to GCC warnings while compiling with W=1 level Leon Romanovsky
2020-08-19 15:39 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200819141630.1338693-2-leon@kernel.org \
--to=leon@kernel.org \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=leonro@nvidia.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox