linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>, Jaegeuk Kim <jaegeuk@kernel.org>,
	Chao Yu <yuchao0@huawei.com>
Cc: linux-f2fs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, Eric Biggers <ebiggers@google.com>
Subject: Re: [f2fs-dev] [PATCH] f2fs: fix 32-bit format string warning
Date: Wed, 25 Jul 2018 23:21:02 +0800	[thread overview]
Message-ID: <08f5d7dd-a271-4cef-4cf3-950c4c251c91@kernel.org> (raw)
In-Reply-To: <20180724093509.1637386-1-arnd@arndb.de>

On 2018/7/24 17:34, Arnd Bergmann wrote:
> On 32-bit targets, size_t is often 'unsigned int', so printing it as %lu
> causes a warning:
> 
> fs/f2fs/inode.c: In function 'sanity_check_inode':
> fs/f2fs/inode.c:247:4: error: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'unsigned int' [-Werror=format=]
> 
> The correct format string is %zu.
> 
> Fixes: ba3a252d3367 ("f2fs: fix to do sanity check with i_extra_isize")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I noticed the issue, thank you for fixing it, but original buggy patch has not
been upstreamed yet, how about merging this fix into origial patch, if you don't
mind?

Thanks,

> ---
>  fs/f2fs/inode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
> index 3fe63b0c7325..4fd339fd3ff2 100644
> --- a/fs/f2fs/inode.c
> +++ b/fs/f2fs/inode.c
> @@ -245,7 +245,7 @@ static bool sanity_check_inode(struct inode *inode, struct page *node_page)
>  		set_sbi_flag(sbi, SBI_NEED_FSCK);
>  		f2fs_msg(sbi->sb, KERN_WARNING,
>  			"%s: inode (ino=%lx) has corrupted i_extra_isize: %d, "
> -			"max: %lu",
> +			"max: %zu",
>  			__func__, inode->i_ino, fi->i_extra_isize,
>  			F2FS_TOTAL_EXTRA_ATTR_SIZE);
>  		return false;
> 

  reply	other threads:[~2018-07-25 15:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24  9:34 [PATCH] f2fs: fix 32-bit format string warning Arnd Bergmann
2018-07-25 15:21 ` Chao Yu [this message]
2018-07-25 19:37   ` [f2fs-dev] " Arnd Bergmann
2018-07-27 10:18     ` Jaegeuk Kim

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=08f5d7dd-a271-4cef-4cf3-950c4c251c91@kernel.org \
    --to=chao@kernel.org \
    --cc=arnd@arndb.de \
    --cc=ebiggers@google.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yuchao0@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;
as well as URLs for NNTP newsgroup(s).