Skip to contentSkip to conversation

fs: ext4: remove unused variable warning in parse_options()

PATCH Applied Olof Johansson 3 participants 3 messages Nov 11, 2019 – Nov 14, 2019 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: ext4: remove unused variable warning in parse_options()

Commit c33fbe8f673c5 ("ext4: Enable blocksize < pagesize for dioread_nolock") removed the only user of 'sbi' outside of the ifdef, so it caused a new warning:

fs/ext4/super.c:2068:23: warning: unused variable 'sbi' [-Wunused-variable]

Fixes c33fbe8f673c5 ("ext4: Enable blocksize < pagesize for dioread_nolock")
---
 fs/ext4/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/super.c +1 -1
index f3279210f0ba9..ee8c42d8a04f0 100644
@@ -2065,7 +2065,7 @@ static int parse_options(char *options, struct super_block *sb,
 			 unsigned int *journal_ioprio,
 			 int is_remount)
 {
-	struct ext4_sb_info *sbi = EXT4_SB(sb);
+	struct ext4_sb_info __maybe_unused *sbi = EXT4_SB(sb);
 	char *p, __maybe_unused *usr_qf_name, __maybe_unused *grp_qf_name;
 	substring_t args[MAX_OPT_ARGS];
 	int token;
Signature · 1 line
2.11.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Olof Johansson

Commit c33fbe8f673c5 ("ext4: Enable blocksize < pagesize for dioread_nolock") removed the only user of 'sbi' outside of the ifdef, so it caused a new warning:

fs/ext4/super.c:2068:23: warning: unused variable 'sbi' [-Wunused-variable]

Fixes c33fbe8f673c5 ("ext4: Enable blocksize < pagesize for dioread_nolock")

hmm, I see that I had CONFIG_QUOTA enabled, so missed this. Thanks for the patch.

You may add:

Quoted 18 lines
---
  fs/ext4/super.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/super.c +1 -1
index f3279210f0ba9..ee8c42d8a04f0 100644
@@ -2065,7 +2065,7 @@ static int parse_options(char *options, struct super_block *sb,
  			 unsigned int *journal_ioprio,
  			 int is_remount)
  {
-	struct ext4_sb_info *sbi = EXT4_SB(sb);
+	struct ext4_sb_info __maybe_unused *sbi = EXT4_SB(sb);
  	char *p, __maybe_unused *usr_qf_name, __maybe_unused *grp_qf_name;
  	substring_t args[MAX_OPT_ARGS];
  	int token;
maintainer Applied
#2 lore raw
Quoted 9 lines · Ritesh Harjani
Quoted 6 lines · Olof Johansson

Commit c33fbe8f673c5 ("ext4: Enable blocksize < pagesize for dioread_nolock") removed the only user of 'sbi' outside of the ifdef, so it caused a new warning:

fs/ext4/super.c:2068:23: warning: unused variable 'sbi' [-Wunused-variable]

Quoted 8 lines
Quoted 2 lines
Fixes c33fbe8f673c5 ("ext4: Enable blocksize < pagesize for dioread_nolock")

hmm, I see that I had CONFIG_QUOTA enabled, so missed this. Thanks for the patch.

You may add:

Thanks, applied.

- Ted