public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Yan <yanaijie@huawei.com>
To: Arnd Bergmann <arnd@kernel.org>, Theodore Ts'o <tytso@mit.edu>,
	Andreas Dilger <adilger.kernel@dilger.ca>
Cc: Arnd Bergmann <arnd@arndb.de>, Jan Kara <jack@suse.cz>,
	Ritesh Harjani <ritesh.list@gmail.com>,
	Eric Biggers <ebiggers@google.com>, Ye Bin <yebin10@huawei.com>,
	Baokun Li <libaokun1@huawei.com>, <linux-ext4@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ext4: avoid unused-variable warning with CONFIG_QUOTA=n
Date: Fri, 21 Apr 2023 15:37:08 +0800	[thread overview]
Message-ID: <6de68c52-b391-6b79-20eb-9ae7fe40e28a@huawei.com> (raw)
In-Reply-To: <20230421070815.2260326-1-arnd@kernel.org>

Hi Arnd,

On 2023/4/21 15:08, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> After some code reshuffling, the index variables in two functions
> are only used in an #ifdef:
> 
> fs/ext4/super.c: In function 'ext4_put_super':
> fs/ext4/super.c:1262:13: error: unused variable 'i' [-Werror=unused-variable]
> fs/ext4/super.c: In function '__ext4_fill_super':
> fs/ext4/super.c:5200:22: error: unused variable 'i' [-Werror=unused-variable]
> 
> Since all supported compilers now allow having variable declarations
> inside of a for() loop, move them into the #ifdef block directly.
> 
> Fixes: dcbf87589d90 ("ext4: factor out ext4_flex_groups_free()")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   fs/ext4/super.c | 7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)

Thanks for the patch. But Nathan has already sent a patch to fix this.

http://patchwork.ozlabs.org/project/linux-ext4/patch/20230420-ext4-unused-variables-super-c-v1-1-138b6db6c21c@kernel.org/

Jason

      reply	other threads:[~2023-04-21  7:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21  7:08 [PATCH] ext4: avoid unused-variable warning with CONFIG_QUOTA=n Arnd Bergmann
2023-04-21  7:37 ` Jason Yan [this message]

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=6de68c52-b391-6b79-20eb-9ae7fe40e28a@huawei.com \
    --to=yanaijie@huawei.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=ebiggers@google.com \
    --cc=jack@suse.cz \
    --cc=libaokun1@huawei.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ritesh.list@gmail.com \
    --cc=tytso@mit.edu \
    --cc=yebin10@huawei.com \
    /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