[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220725160205.GA13489@twin.jikos.cz>
Date: Mon, 25 Jul 2022 18:02:05 +0200
From: David Sterba <dsterba@...e.cz>
To: Nathan Chancellor <nathan@...nel.org>
Cc: Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>,
Ioannis Angelakopoulos <iangelak@...com>,
linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] btrfs: Fix unused variable in load_free_space_cache()
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@...nel.org>
Folded to the patch, thanks.
Powered by blists - more mailing lists