From: David Sterba <dsterba@suse.cz>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>,
Ioannis Angelakopoulos <iangelak@fb.com>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] btrfs: Fix unused variable in load_free_space_cache()
Date: Mon, 25 Jul 2022 18:02:05 +0200 [thread overview]
Message-ID: <20220725160205.GA13489@twin.jikos.cz> (raw)
In-Reply-To: <20220722163854.1189931-1-nathan@kernel.org>
On Fri, Jul 22, 2022 at 09:38:54AM -0700, Nathan Chancellor wrote:
> When CONFIG_LOCKDEP is unset, there is a warning about the mapping
> variable being unused:
>
> fs/btrfs/free-space-cache.c:929:24: warning: variable 'mapping' set but not used [-Wunused-but-set-variable]
> struct address_space *mapping;
> ^
> 1 warning generated.
>
> lockdep_set_class() does not do anything with the first parameter to the
> macro when CONFIG_LOCKDEP is not set so just eliminate the mapping
> variable and use inode instead, which is always used in the function.
>
> Fixes: 22d85ab1af7d ("btrfs: Change the lockdep class of struct inode's invalidate_lock")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1672
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Folded to the patch, thanks.
prev parent reply other threads:[~2022-07-25 16:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 16:38 Nathan Chancellor
2022-07-25 16:02 ` David Sterba [this message]
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=20220725160205.GA13489@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=iangelak@fb.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@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
all inboxes | Powered by JetHome®