Re: [PATCH] btrfs: Fix unused variable in load_free_space_cache()
From: David Sterba
Date: Mon Jul 25 2022 - 12:07:09 EST
- Next message: Steven Rostedt: "Re: [PATCH 3/4] SUNRPC: Replace dprintk() call site in xs_data_ready"
- Previous message: kernel test robot: "drivers/iio/dac/ltc2688.c:84:8: warning: Excessive padding in 'struct ltc2688_state' (35 padding bytes, where 3 is optimal). Optimal fields order: tx_data, rx_data, spi, regmap, iio_chan, vref, lock, regulators, channels, consider reordering the fields or..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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@xxxxxxxxxx>
Folded to the patch, thanks.
- Next message: Steven Rostedt: "Re: [PATCH 3/4] SUNRPC: Replace dprintk() call site in xs_data_ready"
- Previous message: kernel test robot: "drivers/iio/dac/ltc2688.c:84:8: warning: Excessive padding in 'struct ltc2688_state' (35 padding bytes, where 3 is optimal). Optimal fields order: tx_data, rx_data, spi, regmap, iio_chan, vref, lock, regulators, channels, consider reordering the fields or..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]