From: Damien Le Moal <dlemoal@kernel.org>
To: Zhu Jun <zhujun2@cmss.chinamobile.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] zonefs: Fix the wrong format specifier
Date: Mon, 9 Dec 2024 13:47:18 +0900 [thread overview]
Message-ID: <3e8f3f35-a80a-4505-b82d-9ac3f4a90785@kernel.org> (raw)
In-Reply-To: <20241209025242.2995-1-zhujun2@cmss.chinamobile.com>
On 12/9/24 11:52, Zhu Jun wrote:
> Change f to unsigned int to resolve the mismatch in format specifiers for
> snprintf(), where %u should be used for unsigned integers instead of %d
>
> Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
The patch title is now wrong... And you forgot to add a Fixes tag.
Will fix that when applying. Thanks.
> ---
> Changes:
> v2:
> A better fix is to make f "unsigned int" as that is consistent with
> g_nr_zones and the fact that up to "unsigned int" total number of zones are
> allowed for a zoned device.
>
> Can you send a v2 ? Also please add a Fixes tag.
>
> fs/zonefs/super.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
> index faf1eb878..695da258a 100644
> --- a/fs/zonefs/super.c
> +++ b/fs/zonefs/super.c
> @@ -791,7 +791,7 @@ static int zonefs_readdir_zgroup(struct file *file,
> int fname_len;
> char *fname;
> ino_t ino;
> - int f;
> + unsigned int f;
>
> /*
> * The size of zone group directories is equal to the number
--
Damien Le Moal
Western Digital Research
prev parent reply other threads:[~2024-12-09 4:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 2:52 Zhu Jun
2024-12-09 4:47 ` Damien Le Moal [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=3e8f3f35-a80a-4505-b82d-9ac3f4a90785@kernel.org \
--to=dlemoal@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zhujun2@cmss.chinamobile.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
all inboxes | Powered by JetHome®