Skip to contentSkip to conversation

linux-next: build warning after merge of the block tree

DISCUSSION Stephen Rothwell 3 participants 6 messages Apr 17, 2019 – Apr 19, 2019 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the block tree, today's linux-next build (x86_64 allmodconfig) produced this warning:

fs/f2fs/node.c: In function 'f2fs_remove_inode_page':
fs/f2fs/node.c:1193:47: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'blkcnt_t' {aka 'long long unsigned int'} [-Wformat=]

    "Inconsistent i_blocks, ino:%lu, iblocks:%zu",
                                             ~~^
                                             %llu
    inode->i_ino, inode->i_blocks);
                  ~~~~~~~~~~~~~~~               

Introduced by commit

90ae238d9dac ("f2fs: fix to avoid panic in f2fs_remove_inode_page()")

from the f2fs tree interacting with commit

72deb455b5ec ("block: remove CONFIG_LBDAF")

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw

Hi Jaegeuk,

Quoted 5 lines · Stephen Rothwell

Hi all,

After merging the block tree, today's linux-next build (x86_64 allmodconfig) produced this warning:

Quoted 7 lines

fs/f2fs/node.c: In function 'f2fs_remove_inode_page':
fs/f2fs/node.c:1193:47: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'blkcnt_t' {aka 'long long unsigned int'} [-Wformat=]

    "Inconsistent i_blocks, ino:%lu, iblocks:%zu",
                                             ~~^
                                             %llu
    inode->i_ino, inode->i_blocks);
                  ~~~~~~~~~~~~~~~       

Could you please help to fix that as below in your dev branch directly?

"Inconsistent i_blocks, ino:%lu, iblocks:%llu", inode->i_ino, (unsigned long long)inode->i_blocks)

It looks that we need to fix below commits as well:

f2fs: fix to avoid panic in dec_valid_block_count()
f2fs: fix to avoid panic in dec_valid_node_count()

Thanks,

Quoted 9 lines

Introduced by commit

90ae238d9dac ("f2fs: fix to avoid panic in f2fs_remove_inode_page()")

from the f2fs tree interacting with commit

72deb455b5ec ("block: remove CONFIG_LBDAF")

#2 lore raw
Quoted 16 lines · Chao Yu

Hi Jaegeuk,

Quoted 5 lines · Stephen Rothwell

Hi all,

After merging the block tree, today's linux-next build (x86_64 allmodconfig) produced this warning:

Quoted 7 lines

fs/f2fs/node.c: In function 'f2fs_remove_inode_page':
fs/f2fs/node.c:1193:47: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'blkcnt_t' {aka 'long long unsigned int'} [-Wformat=]

    "Inconsistent i_blocks, ino:%lu, iblocks:%zu",
                                             ~~^
                                             %llu
    inode->i_ino, inode->i_blocks);
                  ~~~~~~~~~~~~~~~       
Quoted 3 lines

Could you please help to fix that as below in your dev branch directly?

"Inconsistent i_blocks, ino:%lu, iblocks:%llu",

We can just use "%lu"?

Quoted 19 lines

inode->i_ino, (unsigned long long)inode->i_blocks)

It looks that we need to fix below commits as well:

f2fs: fix to avoid panic in dec_valid_block_count()
f2fs: fix to avoid panic in dec_valid_node_count()

Thanks,

Quoted 9 lines

Introduced by commit

90ae238d9dac ("f2fs: fix to avoid panic in f2fs_remove_inode_page()")

from the f2fs tree interacting with commit

72deb455b5ec ("block: remove CONFIG_LBDAF")

#3 lore raw
Quoted 17 lines · Jaegeuk Kim
Quoted 16 lines · Chao Yu

Hi Jaegeuk,

Quoted 12 lines · Stephen Rothwell

Hi all,

After merging the block tree, today's linux-next build (x86_64 allmodconfig) produced this warning:

fs/f2fs/node.c: In function 'f2fs_remove_inode_page':
fs/f2fs/node.c:1193:47: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'blkcnt_t' {aka 'long long unsigned int'} [-Wformat=]

    "Inconsistent i_blocks, ino:%lu, iblocks:%zu",
                                             ~~^
                                             %llu
    inode->i_ino, inode->i_blocks);
                  ~~~~~~~~~~~~~~~       
Quoted 5 lines
Quoted 3 lines

Could you please help to fix that as below in your dev branch directly?

"Inconsistent i_blocks, ino:%lu, iblocks:%llu",

We can just use "%lu"?

We'd better follow sample in Documentation/core-api/printk-formats.rst:

If <type> is dependent on a config option for its size (e.g., sector_t, blkcnt_t) or is architecture-dependent for its size (e.g., tcflag_t), use a format specifier of its largest possible type and explicitly cast to it.

Example::

printk("test: sector number/total blocks: %llu/%llu\n",
(unsigned long long)sector, (unsigned long long)blockcount);

Thanks,

Quoted 22 lines
Quoted 4 lines

inode->i_ino, (unsigned long long)inode->i_blocks)

Quoted 16 lines

It looks that we need to fix below commits as well:

f2fs: fix to avoid panic in dec_valid_block_count()
f2fs: fix to avoid panic in dec_valid_node_count()

Thanks,

Quoted 9 lines

Introduced by commit

90ae238d9dac ("f2fs: fix to avoid panic in f2fs_remove_inode_page()")

from the f2fs tree interacting with commit

72deb455b5ec ("block: remove CONFIG_LBDAF")

.

#4 lore raw
Quoted 22 lines · Chao Yu
Quoted 21 lines · Jaegeuk Kim
Quoted 19 lines · Chao Yu

Hi Jaegeuk,

Quoted 5 lines · Stephen Rothwell

Hi all,

After merging the block tree, today's linux-next build (x86_64 allmodconfig) produced this warning:

Quoted 7 lines

fs/f2fs/node.c: In function 'f2fs_remove_inode_page':
fs/f2fs/node.c:1193:47: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'blkcnt_t' {aka 'long long unsigned int'} [-Wformat=]

    "Inconsistent i_blocks, ino:%lu, iblocks:%zu",
                                             ~~^
                                             %llu
    inode->i_ino, inode->i_blocks);
                  ~~~~~~~~~~~~~~~       

Could you please help to fix that as below in your dev branch directly?

"Inconsistent i_blocks, ino:%lu, iblocks:%llu",

Quoted 7 lines
Quoted 1 line

We can just use "%lu"?

We'd better follow sample in Documentation/core-api/printk-formats.rst:

If <type> is dependent on a config option for its size (e.g., sector_t, blkcnt_t) or is architecture-dependent for its size (e.g., tcflag_t), use a format specifier of its largest possible type and explicitly cast to it.

Great, done. :)

Thanks,

Quoted 30 lines

Example::

printk("test: sector number/total blocks: %llu/%llu\n",
(unsigned long long)sector, (unsigned long long)blockcount);

Thanks,

Quoted 22 lines
Quoted 4 lines

inode->i_ino, (unsigned long long)inode->i_blocks)

Quoted 16 lines

It looks that we need to fix below commits as well:

f2fs: fix to avoid panic in dec_valid_block_count()
f2fs: fix to avoid panic in dec_valid_node_count()

Thanks,

Quoted 9 lines

Introduced by commit

90ae238d9dac ("f2fs: fix to avoid panic in f2fs_remove_inode_page()")

from the f2fs tree interacting with commit

72deb455b5ec ("block: remove CONFIG_LBDAF")

.

#5 lore raw
Quoted 25 lines · Jaegeuk Kim
Quoted 24 lines · Chao Yu
Quoted 22 lines · Jaegeuk Kim
Quoted 16 lines · Chao Yu

Hi Jaegeuk,

Quoted 5 lines · Stephen Rothwell

Hi all,

After merging the block tree, today's linux-next build (x86_64 allmodconfig) produced this warning:

Quoted 7 lines

fs/f2fs/node.c: In function 'f2fs_remove_inode_page':
fs/f2fs/node.c:1193:47: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'blkcnt_t' {aka 'long long unsigned int'} [-Wformat=]

    "Inconsistent i_blocks, ino:%lu, iblocks:%zu",
                                             ~~^
                                             %llu
    inode->i_ino, inode->i_blocks);
                  ~~~~~~~~~~~~~~~       
Quoted 3 lines

Could you please help to fix that as below in your dev branch directly?

"Inconsistent i_blocks, ino:%lu, iblocks:%llu",

We can just use "%lu"?

Quoted 7 lines
Quoted 5 lines

We'd better follow sample in Documentation/core-api/printk-formats.rst:

If <type> is dependent on a config option for its size (e.g., sector_t, blkcnt_t) or is architecture-dependent for its size (e.g., tcflag_t), use a format specifier of its largest possible type and explicitly cast to it.

Great, done. :)

Thanks, :)

Quoted 35 lines

Thanks,

Quoted 30 lines

Example::

printk("test: sector number/total blocks: %llu/%llu\n",
(unsigned long long)sector, (unsigned long long)blockcount);

Thanks,

Quoted 22 lines
Quoted 4 lines

inode->i_ino, (unsigned long long)inode->i_blocks)

Quoted 16 lines

It looks that we need to fix below commits as well:

f2fs: fix to avoid panic in dec_valid_block_count()
f2fs: fix to avoid panic in dec_valid_node_count()

Thanks,

Quoted 9 lines

Introduced by commit

90ae238d9dac ("f2fs: fix to avoid panic in f2fs_remove_inode_page()")

from the f2fs tree interacting with commit

72deb455b5ec ("block: remove CONFIG_LBDAF")

.

.