* [PATCH] f2fs: fix 32-bit format string warning
@ 2018-07-24 9:34 ` Arnd Bergmann
0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2018-07-24 9:34 UTC (permalink / raw)
To: Jaegeuk Kim, Chao Yu
Cc: Arnd Bergmann, Eric Biggers, Yunlei He, linux-f2fs-devel, linux-kernel
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>
---
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;
--
2.18.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] f2fs: fix 32-bit format string warning
@ 2018-07-24 9:34 ` Arnd Bergmann
0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2018-07-24 9:34 UTC (permalink / raw)
To: Jaegeuk Kim, Chao Yu
Cc: linux-f2fs-devel, linux-kernel, Arnd Bergmann, Eric Biggers
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>
---
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;
--
2.18.0
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: fix 32-bit format string warning
2018-07-24 9:34 ` Arnd Bergmann
(?)
@ 2018-07-25 15:21 ` Chao Yu
2018-07-25 19:37 ` Arnd Bergmann
-1 siblings, 1 reply; 7+ messages in thread
From: Chao Yu @ 2018-07-25 15:21 UTC (permalink / raw)
To: Arnd Bergmann, Jaegeuk Kim, Chao Yu
Cc: linux-f2fs-devel, linux-kernel, Eric Biggers
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;
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: fix 32-bit format string warning
2018-07-25 15:21 ` [f2fs-dev] " Chao Yu
@ 2018-07-25 19:37 ` Arnd Bergmann
0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2018-07-25 19:37 UTC (permalink / raw)
To: Chao Yu
Cc: Jaegeuk Kim, Chao Yu, Linux F2FS DEV, Mailing List,
Linux Kernel Mailing List, Eric Biggers
On Wed, Jul 25, 2018 at 5:21 PM, Chao Yu <chao@kernel.org> wrote:
> 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?
Yes, please do that.
Arnd
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: fix 32-bit format string warning
@ 2018-07-25 19:37 ` Arnd Bergmann
0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2018-07-25 19:37 UTC (permalink / raw)
To: Chao Yu
Cc: Jaegeuk Kim, Chao Yu, Linux F2FS DEV, Mailing List,
Linux Kernel Mailing List, Eric Biggers
On Wed, Jul 25, 2018 at 5:21 PM, Chao Yu <chao@kernel.org> wrote:
> 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?
Yes, please do that.
Arnd
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: fix 32-bit format string warning
2018-07-25 19:37 ` Arnd Bergmann
@ 2018-07-27 10:18 ` Jaegeuk Kim
-1 siblings, 0 replies; 7+ messages in thread
From: Jaegeuk Kim @ 2018-07-27 10:18 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Chao Yu, Chao Yu, Linux F2FS DEV, Mailing List,
Linux Kernel Mailing List, Eric Biggers
On 07/25, Arnd Bergmann wrote:
> On Wed, Jul 25, 2018 at 5:21 PM, Chao Yu <chao@kernel.org> wrote:
> > 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?
>
> Yes, please do that.
Squashed.
Thank you.
>
> Arnd
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: fix 32-bit format string warning
@ 2018-07-27 10:18 ` Jaegeuk Kim
0 siblings, 0 replies; 7+ messages in thread
From: Jaegeuk Kim @ 2018-07-27 10:18 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Chao Yu, Chao Yu, Linux F2FS DEV, Mailing List,
Linux Kernel Mailing List, Eric Biggers
On 07/25, Arnd Bergmann wrote:
> On Wed, Jul 25, 2018 at 5:21 PM, Chao Yu <chao@kernel.org> wrote:
> > 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?
>
> Yes, please do that.
Squashed.
Thank you.
>
> Arnd
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-07-27 10:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-24 9:34 [PATCH] f2fs: fix 32-bit format string warning Arnd Bergmann
2018-07-24 9:34 ` Arnd Bergmann
2018-07-25 15:21 ` [f2fs-dev] " Chao Yu
2018-07-25 19:37 ` Arnd Bergmann
2018-07-25 19:37 ` Arnd Bergmann
2018-07-27 10:18 ` Jaegeuk Kim
2018-07-27 10:18 ` Jaegeuk Kim
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.