Hi Ming, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on scsi/for-next] [cannot apply to v5.4-rc2 next-20191008] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Ming-Lei/scsi-core-avoid-host-wide-host_busy-counter-for-scsi_mq/20191009-015827 base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next config: i386-defconfig (attached as .config) compiler: gcc-7 (Debian 7.4.0-13) 7.4.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 If you fix the issue, kindly add following tag Reported-by: kbuild test robot Note: it may well be a FALSE warning. FWIW you are at least aware of it now. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings All warnings (new ones prefixed by >>): drivers/scsi/scsi_lib.c: In function 'scsi_mq_get_budget': >> drivers/scsi/scsi_lib.c:1293:6: warning: 'busy' may be used uninitialized in this function [-Wmaybe-uninitialized] if (busy) ^ drivers/scsi/scsi_lib.c:1287:15: note: 'busy' was declared here unsigned int busy; ^~~~ vim +/busy +1293 drivers/scsi/scsi_lib.c 7f9a6bc4e9d59e James Bottomley 2007-08-04 1277 ^1da177e4c3f41 Linus Torvalds 2005-04-16 1278 /* ^1da177e4c3f41 Linus Torvalds 2005-04-16 1279 * scsi_dev_queue_ready: if we can send requests to sdev, return 1 else ^1da177e4c3f41 Linus Torvalds 2005-04-16 1280 * return 0. ^1da177e4c3f41 Linus Torvalds 2005-04-16 1281 * ^1da177e4c3f41 Linus Torvalds 2005-04-16 1282 * Called with the queue_lock held. ^1da177e4c3f41 Linus Torvalds 2005-04-16 1283 */ ^1da177e4c3f41 Linus Torvalds 2005-04-16 1284 static inline int scsi_dev_queue_ready(struct request_queue *q, ^1da177e4c3f41 Linus Torvalds 2005-04-16 1285 struct scsi_device *sdev) ^1da177e4c3f41 Linus Torvalds 2005-04-16 1286 { 71e75c97f97a96 Christoph Hellwig 2014-04-11 1287 unsigned int busy; 74eb6c22dc70e3 Ming Lei 2019-10-08 1288 bool bypass = blk_queue_nonrot(sdev->request_queue); 71e75c97f97a96 Christoph Hellwig 2014-04-11 1289 74eb6c22dc70e3 Ming Lei 2019-10-08 1290 if (!bypass) 71e75c97f97a96 Christoph Hellwig 2014-04-11 1291 busy = atomic_inc_return(&sdev->device_busy) - 1; cd9070c9c512ff Christoph Hellwig 2014-01-23 1292 if (atomic_read(&sdev->device_blocked)) { 71e75c97f97a96 Christoph Hellwig 2014-04-11 @1293 if (busy) 71e75c97f97a96 Christoph Hellwig 2014-04-11 1294 goto out_dec; 71e75c97f97a96 Christoph Hellwig 2014-04-11 1295 ^1da177e4c3f41 Linus Torvalds 2005-04-16 1296 /* ^1da177e4c3f41 Linus Torvalds 2005-04-16 1297 * unblock after device_blocked iterates to zero ^1da177e4c3f41 Linus Torvalds 2005-04-16 1298 */ f664a3cc17b7d0 Jens Axboe 2018-11-01 1299 if (atomic_dec_return(&sdev->device_blocked) > 0) 71e75c97f97a96 Christoph Hellwig 2014-04-11 1300 goto out_dec; 71e75c97f97a96 Christoph Hellwig 2014-04-11 1301 SCSI_LOG_MLQUEUE(3, sdev_printk(KERN_INFO, sdev, 71e75c97f97a96 Christoph Hellwig 2014-04-11 1302 "unblocking device at zero depth\n")); ^1da177e4c3f41 Linus Torvalds 2005-04-16 1303 } 71e75c97f97a96 Christoph Hellwig 2014-04-11 1304 74eb6c22dc70e3 Ming Lei 2019-10-08 1305 if (bypass) 74eb6c22dc70e3 Ming Lei 2019-10-08 1306 return 1; 74eb6c22dc70e3 Ming Lei 2019-10-08 1307 71e75c97f97a96 Christoph Hellwig 2014-04-11 1308 if (busy >= sdev->queue_depth) 71e75c97f97a96 Christoph Hellwig 2014-04-11 1309 goto out_dec; ^1da177e4c3f41 Linus Torvalds 2005-04-16 1310 ^1da177e4c3f41 Linus Torvalds 2005-04-16 1311 return 1; 71e75c97f97a96 Christoph Hellwig 2014-04-11 1312 out_dec: 74eb6c22dc70e3 Ming Lei 2019-10-08 1313 if (!bypass) 71e75c97f97a96 Christoph Hellwig 2014-04-11 1314 atomic_dec(&sdev->device_busy); 71e75c97f97a96 Christoph Hellwig 2014-04-11 1315 return 0; ^1da177e4c3f41 Linus Torvalds 2005-04-16 1316 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 1317 :::::: The code at line 1293 was first introduced by commit :::::: 71e75c97f97a9645d25fbf3d8e4165a558f18747 scsi: convert device_busy to atomic_t :::::: TO: Christoph Hellwig :::::: CC: Christoph Hellwig --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation