linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ext4: Elide an unused variable warning in ext4_put_super()
@ 2023-04-30 22:54 Palmer Dabbelt
  2023-04-30 22:54 ` [PATCH 2/2] ext4: Elide an unused variable warning in __ext4_fill_super() Palmer Dabbelt
  0 siblings, 1 reply; 2+ messages in thread
From: Palmer Dabbelt @ 2023-04-30 22:54 UTC (permalink / raw)
  To: tytso, adilger.kernel, linux-ext4; +Cc: Palmer Dabbelt

i is only used under CONFIG_QUOTA, so mark it as __maybe_unused to avoid
a warning.

Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
---
 fs/ext4/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index d03bf0ecf505..09f3e1d714d6 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1259,7 +1259,7 @@ static void ext4_put_super(struct super_block *sb)
 	struct ext4_sb_info *sbi = EXT4_SB(sb);
 	struct ext4_super_block *es = sbi->s_es;
 	int aborted = 0;
-	int i, err;
+	int __maybe_unused i, err;
 
 	/*
 	 * Unregister sysfs before destroying jbd2 journal.
-- 
2.40.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] ext4: Elide an unused variable warning in __ext4_fill_super()
  2023-04-30 22:54 [PATCH 1/2] ext4: Elide an unused variable warning in ext4_put_super() Palmer Dabbelt
@ 2023-04-30 22:54 ` Palmer Dabbelt
  0 siblings, 0 replies; 2+ messages in thread
From: Palmer Dabbelt @ 2023-04-30 22:54 UTC (permalink / raw)
  To: tytso, adilger.kernel, linux-ext4; +Cc: Palmer Dabbelt

i is only used under CONFIG_QUOTA, so mark it as __maybe_unused to
avoid a warning.

Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
---
 fs/ext4/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 09f3e1d714d6..3bf2449befcc 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5197,7 +5197,7 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
 	ext4_fsblk_t logical_sb_block;
 	struct inode *root;
 	int ret = -ENOMEM;
-	unsigned int i;
+	unsigned int __maybe_unused i;
 	int needs_recovery;
 	int err = 0;
 	ext4_group_t first_not_zeroed;
-- 
2.40.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-30 22:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-30 22:54 [PATCH 1/2] ext4: Elide an unused variable warning in ext4_put_super() Palmer Dabbelt
2023-04-30 22:54 ` [PATCH 2/2] ext4: Elide an unused variable warning in __ext4_fill_super() Palmer Dabbelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).