Skip to contentSkip to conversation

linux-next: build warning after merge of the ext4 tree

DISCUSSION Stephen Rothwell 2 participants 3 messages May 20, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the ext4 tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning:

fs/ext4/super.c: In function 'ext4_check_test_dummy_encryption':
fs/ext4/super.c:2677:36: warning: unused variable 'sbi' [-Wunused-variable]
2677 | const struct ext4_sb_info *sbi = EXT4_SB(sb);
| ^~~

Introduced by commit

0df27ddf69f3 ("ext4: only allow test_dummy_encryption when supported")

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 5 lines · Stephen Rothwell

Hi all,

After merging the ext4 tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning:

Quoted 9 lines

fs/ext4/super.c: In function 'ext4_check_test_dummy_encryption':
fs/ext4/super.c:2677:36: warning: unused variable 'sbi' [-Wunused-variable]
2677 | const struct ext4_sb_info *sbi = EXT4_SB(sb);
| ^~~

Introduced by commit

0df27ddf69f3 ("ext4: only allow test_dummy_encryption when supported")

The kernel test robot beat you to it! This warning happens when !CONFIG_FS_ENCRYPTION. v4 of the patch fixes this
(https://lore.kernel.org/r/[email protected]).

- Eric

#2 lore raw
In reply to Stephen Rothwell

Hi all,

Quoted 4 lines · On Fri, 20 May 2022 11:03:13 +1000 Stephen Rothwell <[email protected]>…

After merging the ext4 tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning:

Quoted 8 lines

fs/ext4/super.c: In function 'ext4_check_test_dummy_encryption':
fs/ext4/super.c:2677:36: warning: unused variable 'sbi' [-Wunused-variable]
2677 | const struct ext4_sb_info *sbi = EXT4_SB(sb);
| ^~~

Introduced by commit

0df27ddf69f3 ("ext4: only allow test_dummy_encryption when supported")

This becomes an error in an i386 defconfig build, so I have applied the following hack for today.

From: Stephen Rothwell <[email protected]>
Date: Fri, 20 May 2022 22:48:55 +1000
Subject: [PATCH] hack fixup for "ext4: only allow test_dummy_encryption when supported"

---
 fs/ext4/super.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/ext4/super.c +1 -2
index 5168d894c41e..f9a3ad683b4a 100644
@@ -2674,7 +2674,6 @@ static int ext4_check_test_dummy_encryption(const struct fs_context *fc,
 					    struct super_block *sb)
 {
 	const struct ext4_fs_context *ctx = fc->fs_private;
-	const struct ext4_sb_info *sbi = EXT4_SB(sb);
 
 	if (!IS_ENABLED(CONFIG_FS_ENCRYPTION) ||
 	    !(ctx->spec & EXT4_SPEC_DUMMY_ENCRYPTION))
@@ -2692,7 +2691,7 @@ static int ext4_check_test_dummy_encryption(const struct fs_context *fc,
 	 * it to be specified during remount, but only if there is no change.
 	 */
 	if (fc->purpose == FS_CONTEXT_FOR_RECONFIGURE &&
-	    !DUMMY_ENCRYPTION_ENABLED(sbi)) {
+	    !DUMMY_ENCRYPTION_ENABLED(EXT4_SB(sb))) {
 		ext4_msg(NULL, KERN_WARNING,
 			 "Can't set test_dummy_encryption on remount");
 		return -EINVAL;
Signature · 5 lines
2.35.1

-- 
Cheers,
Stephen Rothwell