tree:
git://git.infradead.org/users/hch/misc.git blkdev_get-cleanups
head: 55dac63d56fe4cf5e47acc2fa99ac6213d6c96c1
commit: 2acfd13168491a99627a7452856a49c851a3e165 [8/14] dasd: cleanup
dasd_scan_partitions
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 2acfd13168491a99627a7452856a49c851a3e165
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/s390/block/dasd_int.h:56,
from drivers/s390/block/dasd_genhd.c:25:
drivers/s390/block/dasd_genhd.c: In function 'dasd_scan_partitions':
> drivers/s390/block/dasd_genhd.c:107:10: warning: format
'%ld' expects argument of type 'long int', but argument 4 has type
'int' [-Wformat=]
107 | "scan partitions error,
blkdev_get returned %ld",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
108 | IS_ERR(bdev));
| ~~~~~~~~~~~~
| |
| int
arch/s390/include/asm/debug.h:256:12: note: in definition of macro
'debug_sprintf_event'
256 | _fmt, ## __VA_ARGS__); \
| ^~~~
drivers/s390/block/dasd_genhd.c:106:3: note: in expansion of macro
'DBF_DEV_EVENT'
106 | DBF_DEV_EVENT(DBF_ERR, block->base,
| ^~~~~~~~~~~~~
drivers/s390/block/dasd_genhd.c:107:56: note: format string is defined here
107 | "scan partitions error, blkdev_get returned %ld",
| ~~^
| |
| long int
| %d
git remote add hch-misc
git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc blkdev_get-cleanups
git checkout 2acfd13168491a99627a7452856a49c851a3e165
vim +107 drivers/s390/block/dasd_genhd.c
95
96 /*
97 * Trigger a partition detection.
98 */
99 int dasd_scan_partitions(struct dasd_block *block)
100 {
101 struct block_device *bdev;
102 int rc;
103
104 bdev = blkdev_get_by_dev(disk_devt(block->gdp), FMODE_READ, NULL);
105 if (IS_ERR(bdev)) {
106 DBF_DEV_EVENT(DBF_ERR, block->base,
107 "scan partitions error, blkdev_get returned
%ld",
108 IS_ERR(bdev));
109 return -ENODEV;
110 }
111
112 mutex_lock(&bdev->bd_mutex);
113 rc = bdev_disk_changed(bdev, false);
114 mutex_unlock(&bdev->bd_mutex);
115 if (rc)
116 DBF_DEV_EVENT(DBF_ERR, block->base,
117 "scan partitions error, rc %d", rc);
118
119 /*
120 * Since the matching blkdev_put call to the blkdev_get in
121 * this function is not called before dasd_destroy_partitions
122 * the offline open_count limit needs to be increased from
123 * 0 to 1. This is done by setting device->bdev (see
124 * dasd_generic_set_offline). As long as the partition
125 * detection is running no offline should be allowed. That
126 * is why the assignment to device->bdev is done AFTER
127 * the BLKRRPART ioctl.
128 */
129 block->bdev = bdev;
130 return 0;
131 }
132
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org