From: kernel test robot <lkp@intel.com>
To: Eric Biggers <ebiggers@google.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-ext4@vger.kernel.org, Theodore Ts'o <tytso@mit.edu>
Subject: [tytso-ext4:dev 17/25] fs/ext4/super.c:2799:29: warning: unused variable 'sbi'
Date: Fri, 20 May 2022 04:12:21 +0800 [thread overview]
Message-ID: <202205200431.kzojEoNc-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
head: b76a7dd9a7437e8c21253ce3a7574bebde3827f9
commit: 0df27ddf69f38e5ab1e1c73e46c35eecc6ca1609 [17/25] ext4: only allow test_dummy_encryption when supported
config: i386-randconfig-a004 (https://download.01.org/0day-ci/archive/20220520/202205200431.kzojEoNc-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project e00cbbec06c08dc616a0d52a20f678b8fbd4e304)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git/commit/?id=0df27ddf69f38e5ab1e1c73e46c35eecc6ca1609
git remote add tytso-ext4 https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git
git fetch --no-tags tytso-ext4 dev
git checkout 0df27ddf69f38e5ab1e1c73e46c35eecc6ca1609
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash fs/ext4/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> fs/ext4/super.c:2799:29: warning: unused variable 'sbi' [-Wunused-variable]
const struct ext4_sb_info *sbi = EXT4_SB(sb);
^
1 warning generated.
vim +/sbi +2799 fs/ext4/super.c
2794
2795 static int ext4_check_test_dummy_encryption(const struct fs_context *fc,
2796 struct super_block *sb)
2797 {
2798 const struct ext4_fs_context *ctx = fc->fs_private;
> 2799 const struct ext4_sb_info *sbi = EXT4_SB(sb);
2800
2801 if (!IS_ENABLED(CONFIG_FS_ENCRYPTION) ||
2802 !(ctx->spec & EXT4_SPEC_DUMMY_ENCRYPTION))
2803 return 0;
2804
2805 if (!ext4_has_feature_encrypt(sb)) {
2806 ext4_msg(NULL, KERN_WARNING,
2807 "test_dummy_encryption requires encrypt feature");
2808 return -EINVAL;
2809 }
2810 /*
2811 * This mount option is just for testing, and it's not worthwhile to
2812 * implement the extra complexity (e.g. RCU protection) that would be
2813 * needed to allow it to be set or changed during remount. We do allow
2814 * it to be specified during remount, but only if there is no change.
2815 */
2816 if (fc->purpose == FS_CONTEXT_FOR_RECONFIGURE &&
2817 !DUMMY_ENCRYPTION_ENABLED(sbi)) {
2818 ext4_msg(NULL, KERN_WARNING,
2819 "Can't set test_dummy_encryption on remount");
2820 return -EINVAL;
2821 }
2822 return 0;
2823 }
2824
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next reply other threads:[~2022-05-19 20:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-19 20:12 kernel test robot [this message]
2022-05-19 20:33 ` [tytso-ext4:dev 17/25] fs/ext4/super.c:2799:29: warning: unused variable 'sbi' Eric Biggers
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=202205200431.kzojEoNc-lkp@intel.com \
--to=lkp@intel.com \
--cc=ebiggers@google.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-ext4@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=tytso@mit.edu \
/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