Re: [PATCH] blk-mq: use BLK_MQ_NO_TAG for no tag

kernel test robot
2020-08-23T19:45:49Z

[-- Attachment #1: Type: text/plain, Size: 13464 bytes --]

Hi Xianting,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on block/for-next]
[also build test ERROR on linux/master linus/master v5.9-rc1 next-20200821]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Xianting-Tian/blk-mq-use-BLK_MQ_NO_TAG-for-no-tag/20200824-012255
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: alpha-randconfig-s031-20200824 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=alpha

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

In file included from drivers/lightnvm/pblk.h:25,
from drivers/lightnvm/pblk-init.c:22:
include/linux/blk-mq.h: In function 'request_to_qc_t':
>> include/linux/blk-mq.h:572:17: error: 'BLK_MQ_NO_TAG' undeclared (first use in this function)
572 | if (rq->tag != BLK_MQ_NO_TAG)
| ^~~~~~~~~~~~~
include/linux/blk-mq.h:572:17: note: each undeclared identifier is reported only once for each function it appears in
--
In file included from include/scsi/scsi_host.h:11,
from drivers/scsi/scsi_sysfs.c:19:
include/linux/blk-mq.h: In function 'request_to_qc_t':
>> include/linux/blk-mq.h:572:17: error: 'BLK_MQ_NO_TAG' undeclared (first use in this function)
572 | if (rq->tag != BLK_MQ_NO_TAG)
| ^~~~~~~~~~~~~
include/linux/blk-mq.h:572:17: note: each undeclared identifier is reported only once for each function it appears in
drivers/scsi/scsi_sysfs.c: At top level:
drivers/scsi/scsi_sysfs.c:1027:10: fatal error: scsi_devinfo_tbl.c: No such file or directory
1027 | #include "scsi_devinfo_tbl.c"
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
--
In file included from include/scsi/scsi_request.h:5,
from include/scsi/scsi_cmnd.h:13,
from drivers/scsi/BusLogic.c:46:
include/linux/blk-mq.h: In function 'request_to_qc_t':
>> include/linux/blk-mq.h:572:17: error: 'BLK_MQ_NO_TAG' undeclared (first use in this function)
572 | if (rq->tag != BLK_MQ_NO_TAG)
| ^~~~~~~~~~~~~
include/linux/blk-mq.h:572:17: note: each undeclared identifier is reported only once for each function it appears in
drivers/scsi/BusLogic.c: In function 'blogic_msg':
drivers/scsi/BusLogic.c:3591:2: warning: function 'blogic_msg' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
3591 | len = vsprintf(buf, fmt, args);
| ^~~
--
In file included from include/scsi/scsi_request.h:5,
from include/scsi/scsi_cmnd.h:13,
from drivers/scsi/dpt_i2o.c:62:
include/linux/blk-mq.h: In function 'request_to_qc_t':
>> include/linux/blk-mq.h:572:17: error: 'BLK_MQ_NO_TAG' undeclared (first use in this function)
572 | if (rq->tag != BLK_MQ_NO_TAG)
| ^~~~~~~~~~~~~
include/linux/blk-mq.h:572:17: note: each undeclared identifier is reported only once for each function it appears in
drivers/scsi/dpt_i2o.c: In function 'adpt_slave_configure':
drivers/scsi/dpt_i2o.c:411:12: warning: variable 'pHba' set but not used [-Wunused-but-set-variable]
411 | adpt_hba* pHba;
| ^~~~
--
In file included from include/scsi/scsi_request.h:5,
from include/scsi/scsi_cmnd.h:13,
from drivers/scsi/aha1542.c:23:
include/linux/blk-mq.h: In function 'request_to_qc_t':
>> include/linux/blk-mq.h:572:17: error: 'BLK_MQ_NO_TAG' undeclared (first use in this function)
572 | if (rq->tag != BLK_MQ_NO_TAG)
| ^~~~~~~~~~~~~
include/linux/blk-mq.h:572:17: note: each undeclared identifier is reported only once for each function it appears in
drivers/scsi/aha1542.c: In function 'aha1542_test_port':
drivers/scsi/aha1542.c:195:5: warning: variable 'inquiry_result' set but not used [-Wunused-but-set-variable]
195 | u8 inquiry_result[4];
| ^~~~~~~~~~~~~~
--
In file included from include/scsi/scsi_request.h:5,
from include/scsi/scsi_cmnd.h:13,
from drivers/scsi/qla1280.c:355:
include/linux/blk-mq.h: In function 'request_to_qc_t':
>> include/linux/blk-mq.h:572:17: error: 'BLK_MQ_NO_TAG' undeclared (first use in this function)
572 | if (rq->tag != BLK_MQ_NO_TAG)
| ^~~~~~~~~~~~~
include/linux/blk-mq.h:572:17: note: each undeclared identifier is reported only once for each function it appears in
drivers/scsi/qla1280.c: In function 'qla1280_done':
drivers/scsi/qla1280.c:1244:19: warning: variable 'lun' set but not used [-Wunused-but-set-variable]
1244 | int bus, target, lun;
| ^~~
drivers/scsi/qla1280.c: In function 'qla1280_nvram_config':
drivers/scsi/qla1280.c:2188:36: warning: variable 'ddma_conf' set but not used [-Wunused-but-set-variable]
2188 | uint16_t hwrev, cfg1, cdma_conf, ddma_conf;
| ^~~~~~~~~
drivers/scsi/qla1280.c: In function 'qla1280_mailbox_command':
drivers/scsi/qla1280.c:2430:11: warning: variable 'data' set but not used [-Wunused-but-set-variable]
2430 | uint16_t data;
| ^~~~
drivers/scsi/qla1280.c: In function 'qla1280_status_entry':
drivers/scsi/qla1280.c:3607:28: warning: variable 'lun' set but not used [-Wunused-but-set-variable]
3607 | unsigned int bus, target, lun;
| ^~~
drivers/scsi/qla1280.c:3607:20: warning: variable 'target' set but not used [-Wunused-but-set-variable]
3607 | unsigned int bus, target, lun;
| ^~~~~~
drivers/scsi/qla1280.c:3607:15: warning: variable 'bus' set but not used [-Wunused-but-set-variable]
3607 | unsigned int bus, target, lun;
| ^~~
--
In file included from include/scsi/scsi_request.h:5,
from include/scsi/scsi_cmnd.h:13,
from drivers/scsi/dc395x.c:64:
include/linux/blk-mq.h: In function 'request_to_qc_t':
>> include/linux/blk-mq.h:572:17: error: 'BLK_MQ_NO_TAG' undeclared (first use in this function)
572 | if (rq->tag != BLK_MQ_NO_TAG)
| ^~~~~~~~~~~~~
include/linux/blk-mq.h:572:17: note: each undeclared identifier is reported only once for each function it appears in
drivers/scsi/dc395x.c: In function 'start_scsi':
drivers/scsi/dc395x.c:1359:6: warning: variable 's_stat2' set but not used [-Wunused-but-set-variable]
1359 | u16 s_stat2, return_code;
| ^~~~~~~
drivers/scsi/dc395x.c: In function 'data_io_transfer':
drivers/scsi/dc395x.c:2400:16: warning: variable 'data2' set but not used [-Wunused-but-set-variable]
2400 | u8 data = 0, data2 = 0;
| ^~~~~
drivers/scsi/dc395x.c:2400:6: warning: variable 'data' set but not used [-Wunused-but-set-variable]
2400 | u8 data = 0, data2 = 0;
| ^~~~
drivers/scsi/dc395x.c: In function 'reselect':
drivers/scsi/dc395x.c:2992:5: warning: variable 'arblostflag' set but not used [-Wunused-but-set-variable]
2992 | u8 arblostflag = 0;
| ^~~~~~~~~~~
drivers/scsi/dc395x.c: In function 'doing_srb_done':
drivers/scsi/dc395x.c:3393:28: warning: variable 'dir' set but not used [-Wunused-but-set-variable]
3393 | enum dma_data_direction dir;
| ^~~
--
In file included from include/scsi/scsi_request.h:5,
from include/scsi/scsi_cmnd.h:13,
from drivers/scsi/a100u2w.c:78:
include/linux/blk-mq.h: In function 'request_to_qc_t':
>> include/linux/blk-mq.h:572:17: error: 'BLK_MQ_NO_TAG' undeclared (first use in this function)
572 | if (rq->tag != BLK_MQ_NO_TAG)
| ^~~~~~~~~~~~~
include/linux/blk-mq.h:572:17: note: each undeclared identifier is reported only once for each function it appears in
drivers/scsi/a100u2w.c: In function 'inia100_probe_one':
drivers/scsi/a100u2w.c:1092:8: warning: variable 'bios_phys' set but not used [-Wunused-but-set-variable]
1092 | char *bios_phys;
| ^~~~~~~~~
--
In file included from include/scsi/scsi_host.h:11,
from drivers/scsi/myrb.c:21:
include/linux/blk-mq.h: In function 'request_to_qc_t':
>> include/linux/blk-mq.h:572:17: error: 'BLK_MQ_NO_TAG' undeclared (first use in this function)
572 | if (rq->tag != BLK_MQ_NO_TAG)
| ^~~~~~~~~~~~~
include/linux/blk-mq.h:572:17: note: each undeclared identifier is reported only once for each function it appears in
drivers/scsi/myrb.c: At top level:
drivers/scsi/myrb.c:2492:6: warning: no previous prototype for 'myrb_err_status' [-Wmissing-prototypes]
2492 | bool myrb_err_status(struct myrb_hba *cb, unsigned char error,
| ^~~~~~~~~~~~~~~
--
In file included from include/scsi/scsi_host.h:11,
from drivers/scsi/myrs.c:22:
include/linux/blk-mq.h: In function 'request_to_qc_t':
>> include/linux/blk-mq.h:572:17: error: 'BLK_MQ_NO_TAG' undeclared (first use in this function)
572 | if (rq->tag != BLK_MQ_NO_TAG)
| ^~~~~~~~~~~~~
include/linux/blk-mq.h:572:17: note: each undeclared identifier is reported only once for each function it appears in
drivers/scsi/myrs.c: In function 'consistency_check_show':
drivers/scsi/myrs.c:1194:16: warning: variable 'status' set but not used [-Wunused-but-set-variable]
1194 | unsigned char status;
| ^~~~~~
drivers/scsi/myrs.c: At top level:
drivers/scsi/myrs.c:1532:5: warning: no previous prototype for 'myrs_host_reset' [-Wmissing-prototypes]
1532 | int myrs_host_reset(struct scsi_cmnd *scmd)
| ^~~~~~~~~~~~~~~
drivers/scsi/myrs.c: In function 'myrs_get_resync':
drivers/scsi/myrs.c:1985:5: warning: variable 'status' set but not used [-Wunused-but-set-variable]
1985 | u8 status;
| ^~~~~~
drivers/scsi/myrs.c: At top level:
drivers/scsi/myrs.c:2046:6: warning: no previous prototype for 'myrs_flush_cache' [-Wmissing-prototypes]
2046 | void myrs_flush_cache(struct myrs_hba *cs)
| ^~~~~~~~~~~~~~~~
--
In file included from include/scsi/scsi_host.h:11,
from drivers/scsi/3w-9xxx.c:97:
include/linux/blk-mq.h: In function 'request_to_qc_t':
>> include/linux/blk-mq.h:572:17: error: 'BLK_MQ_NO_TAG' undeclared (first use in this function)
572 | if (rq->tag != BLK_MQ_NO_TAG)
| ^~~~~~~~~~~~~
include/linux/blk-mq.h:572:17: note: each undeclared identifier is reported only once for each function it appears in
drivers/scsi/3w-9xxx.c: In function 'twa_empty_response_queue':
drivers/scsi/3w-9xxx.c:942:24: warning: variable 'response_que_value' set but not used [-Wunused-but-set-variable]
942 | u32 status_reg_value, response_que_value;
| ^~~~~~~~~~~~~~~~~~
drivers/scsi/3w-9xxx.c: In function 'twa_scsi_biosparam':
drivers/scsi/3w-9xxx.c:1701:23: warning: variable 'tw_dev' set but not used [-Wunused-but-set-variable]
1701 | TW_Device_Extension *tw_dev;
| ^~~~~~
drivers/scsi/3w-9xxx.c: In function 'twa_scsiop_execute_scsi':
drivers/scsi/3w-9xxx.c:1812:22: warning: variable 'sglist' set but not used [-Wunused-but-set-variable]
1812 | struct scatterlist *sglist = NULL, *sg;
| ^~~~~~
..

# https://github.com/0day-ci/linux/commit/3f57d0952e89e23c6c5b65b816d3f0a9c9747583
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Xianting-Tian/blk-mq-use-BLK_MQ_NO_TAG-for-no-tag/20200824-012255
git checkout 3f57d0952e89e23c6c5b65b816d3f0a9c9747583
vim +/BLK_MQ_NO_TAG +572 include/linux/blk-mq.h

560
561 #define queue_for_each_hw_ctx(q, hctx, i) \
562 for ((i) = 0; (i) < (q)->nr_hw_queues && \
563 ({ hctx = (q)->queue_hw_ctx[i]; 1; }); (i)++)
564
565 #define hctx_for_each_ctx(hctx, ctx, i) \
566 for ((i) = 0; (i) < (hctx)->nr_ctx && \
567 ({ ctx = (hctx)->ctxs[(i)]; 1; }); (i)++)
568
569 static inline blk_qc_t request_to_qc_t(struct blk_mq_hw_ctx *hctx,
570 struct request *rq)
571 {
> 572 if (rq->tag != BLK_MQ_NO_TAG)
573 return rq->tag | (hctx->queue_num << BLK_QC_T_SHIFT);
574
575 return rq->internal_tag | (hctx->queue_num << BLK_QC_T_SHIFT) |
576 BLK_QC_T_INTERNAL;
577 }
578

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 22461 bytes --]