Re: [PATCH] genhd: incrase size of disk stat counters
From: kbuild test robot <hidden>
Date: 2018-07-31 12:13:13
Also in:
lkml
Hi huijin.park, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on block/for-next] [also build test WARNING on next-20180727] [cannot apply to v4.18-rc7] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Huijin-Park/genhd-incrase-size-of-disk-stat-counters/20180731-173548 base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next config: um-x86_64_defconfig (attached as .config) compiler: gcc-7 (Debian 7.3.0-16) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=um SUBARCH=x86_64 All warnings (new ones prefixed by >>): fs/ext4/sysfs.c: In function 'session_write_kbytes_show':
quoted
fs/ext4/sysfs.c:58:37: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'long long unsigned int' [-Wformat=]
return snprintf(buf, PAGE_SIZE, "%lu\n",
~~^
%llu
(part_stat_read(sb->s_bdev->bd_part,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sectors[STAT_WRITE]) -
~~~~~~~~~~~~~~~~~~~~~~
sbi->s_sectors_written_start) >> 1);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +58 fs/ext4/sysfs.c
b5799018 Theodore Ts'o 2015-09-23 51
6ca06829 Tyson Nottingham 2018-03-30 52 static ssize_t session_write_kbytes_show(struct ext4_sb_info *sbi, char *buf)
b5799018 Theodore Ts'o 2015-09-23 53 {
b5799018 Theodore Ts'o 2015-09-23 54 struct super_block *sb = sbi->s_buddy_cache->i_sb;
b5799018 Theodore Ts'o 2015-09-23 55
b5799018 Theodore Ts'o 2015-09-23 56 if (!sb->s_bdev->bd_part)
b5799018 Theodore Ts'o 2015-09-23 57 return snprintf(buf, PAGE_SIZE, "0\n");
b5799018 Theodore Ts'o 2015-09-23 @58 return snprintf(buf, PAGE_SIZE, "%lu\n",
dbae2c55 Michael Callahan 2018-07-18 59 (part_stat_read(sb->s_bdev->bd_part,
dbae2c55 Michael Callahan 2018-07-18 60 sectors[STAT_WRITE]) -
b5799018 Theodore Ts'o 2015-09-23 61 sbi->s_sectors_written_start) >> 1);
b5799018 Theodore Ts'o 2015-09-23 62 }
b5799018 Theodore Ts'o 2015-09-23 63
:::::: The code at line 58 was first introduced by commit
:::::: b5799018827e67867fda77c3cde10fc080606fe2 ext4: move sysfs code from super.c to fs/ext4/sysfs.c
:::::: TO: Theodore Ts'o [off-list ref]
:::::: CC: Theodore Ts'o [off-list ref]
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation Attachments
- .config.gz [application/gzip] 7568 bytes