* [PATCH] blk-mq: use BLK_MQ_NO_TAG for no tag
@ 2020-08-23 15:44 Xianting Tian
2020-08-23 19:44 ` kernel test robot
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Xianting Tian @ 2020-08-23 15:44 UTC (permalink / raw)
To: axboe, ast, daniel, kafai, songliubraving, yhs, andriin,
john.fastabend, kpsingh
Cc: linux-block, linux-kernel, Xianting Tian
Replace various magic -1 constants for tags with BLK_MQ_NO_TAG.
Signed-off-by: Xianting Tian <tian.xianting@h3c.com>
---
block/blk-core.c | 4 ++--
block/blk-mq-sched.c | 2 +-
include/linux/blk-mq.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index d9d632639..c7eaf7504 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -116,8 +116,8 @@ void blk_rq_init(struct request_queue *q, struct request *rq)
rq->__sector = (sector_t) -1;
INIT_HLIST_NODE(&rq->hash);
RB_CLEAR_NODE(&rq->rb_node);
- rq->tag = -1;
- rq->internal_tag = -1;
+ rq->tag = BLK_MQ_NO_TAG;
+ rq->internal_tag = BLK_MQ_NO_TAG;
rq->start_time_ns = ktime_get_ns();
rq->part = NULL;
refcount_set(&rq->ref, 1);
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
index a19cdf159..439481f59 100644
--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -522,7 +522,7 @@ void blk_mq_sched_insert_request(struct request *rq, bool at_head,
goto run;
}
- WARN_ON(e && (rq->tag != -1));
+ WARN_ON(e && (rq->tag != BLK_MQ_NO_TAG));
if (blk_mq_sched_bypass_insert(hctx, !!e, rq)) {
/*
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index 9d2d5ad36..161d8a0e6 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -569,7 +569,7 @@ static inline void *blk_mq_rq_to_pdu(struct request *rq)
static inline blk_qc_t request_to_qc_t(struct blk_mq_hw_ctx *hctx,
struct request *rq)
{
- if (rq->tag != -1)
+ if (rq->tag != BLK_MQ_NO_TAG)
return rq->tag | (hctx->queue_num << BLK_QC_T_SHIFT);
return rq->internal_tag | (hctx->queue_num << BLK_QC_T_SHIFT) |
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] blk-mq: use BLK_MQ_NO_TAG for no tag
2020-08-23 15:44 [PATCH] blk-mq: use BLK_MQ_NO_TAG for no tag Xianting Tian
@ 2020-08-23 19:44 ` kernel test robot
2020-08-23 20:56 ` kernel test robot
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2020-08-23 19:44 UTC (permalink / raw)
To: Xianting Tian, axboe, ast, daniel, kafai, songliubraving, yhs,
andriin, john.fastabend, kpsingh
Cc: kbuild-all, linux-block
[-- 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 --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] blk-mq: use BLK_MQ_NO_TAG for no tag
2020-08-23 15:44 [PATCH] blk-mq: use BLK_MQ_NO_TAG for no tag Xianting Tian
2020-08-23 19:44 ` kernel test robot
@ 2020-08-23 20:56 ` kernel test robot
2020-08-23 20:58 ` Jens Axboe
2020-08-24 1:04 ` kernel test robot
3 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2020-08-23 20:56 UTC (permalink / raw)
To: Xianting Tian, axboe, ast, daniel, kafai, songliubraving, yhs,
andriin, john.fastabend, kpsingh
Cc: kbuild-all, clang-built-linux, linux-block
[-- Attachment #1: Type: text/plain, Size: 14597 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: arm64-randconfig-r034-20200824 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b587ca93be114d07ec3bf654add97d7872325281)
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
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from drivers/mtd/ubi/block.c:40:
>> include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
if (rq->tag != BLK_MQ_NO_TAG)
^
1 error generated.
--
In file included from drivers/ata/ahci_platform.c:17:
In file included from include/linux/libata.h:21:
In file included from include/scsi/scsi_host.h:11:
>> include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
if (rq->tag != BLK_MQ_NO_TAG)
^
drivers/ata/ahci_platform.c:40:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
AHCI_SHT(DRV_NAME),
^~~~~~~~~~~~~~~~~~
drivers/ata/ahci.h:385:16: note: expanded from macro 'AHCI_SHT'
.can_queue = AHCI_MAX_CMDS, \
^~~~~~~~~~~~~
drivers/ata/ahci_platform.c:40:2: note: previous initialization is here
AHCI_SHT(DRV_NAME),
^~~~~~~~~~~~~~~~~~
drivers/ata/ahci.h:384:2: note: expanded from macro 'AHCI_SHT'
ATA_NCQ_SHT(drv_name), \
^~~~~~~~~~~~~~~~~~~~~
include/linux/libata.h:1417:2: note: expanded from macro 'ATA_NCQ_SHT'
__ATA_BASE_SHT(drv_name), \
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/libata.h:1399:16: note: expanded from macro '__ATA_BASE_SHT'
.can_queue = ATA_DEF_QUEUE, \
^~~~~~~~~~~~~
drivers/ata/ahci_platform.c:40:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
AHCI_SHT(DRV_NAME),
^~~~~~~~~~~~~~~~~~
drivers/ata/ahci.h:389:17: note: expanded from macro 'AHCI_SHT'
.sdev_attrs = ahci_sdev_attrs
^~~~~~~~~~~~~~~
drivers/ata/ahci_platform.c:40:2: note: previous initialization is here
AHCI_SHT(DRV_NAME),
^~~~~~~~~~~~~~~~~~
drivers/ata/ahci.h:384:2: note: expanded from macro 'AHCI_SHT'
ATA_NCQ_SHT(drv_name), \
^~~~~~~~~~~~~~~~~~~~~
include/linux/libata.h:1418:17: note: expanded from macro 'ATA_NCQ_SHT'
.sdev_attrs = ata_ncq_sdev_attrs, \
^~~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
--
In file included from drivers/ata/libahci_platform.c:19:
In file included from include/linux/libata.h:21:
In file included from include/scsi/scsi_host.h:11:
>> include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
if (rq->tag != BLK_MQ_NO_TAG)
^
>> drivers/ata/libahci_platform.c:644:42: warning: shift count >= width of type [-Wshift-count-overflow]
rc = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
1 warning and 1 error generated.
--
In file included from drivers/ata/ahci_tegra.c:23:
In file included from drivers/ata/ahci.h:24:
In file included from include/linux/libata.h:21:
In file included from include/scsi/scsi_host.h:11:
>> include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
if (rq->tag != BLK_MQ_NO_TAG)
^
drivers/ata/ahci_tegra.c:477:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
AHCI_SHT(DRV_NAME),
^~~~~~~~~~~~~~~~~~
drivers/ata/ahci.h:385:16: note: expanded from macro 'AHCI_SHT'
.can_queue = AHCI_MAX_CMDS, \
^~~~~~~~~~~~~
drivers/ata/ahci_tegra.c:477:2: note: previous initialization is here
AHCI_SHT(DRV_NAME),
^~~~~~~~~~~~~~~~~~
drivers/ata/ahci.h:384:2: note: expanded from macro 'AHCI_SHT'
ATA_NCQ_SHT(drv_name), \
^~~~~~~~~~~~~~~~~~~~~
include/linux/libata.h:1417:2: note: expanded from macro 'ATA_NCQ_SHT'
__ATA_BASE_SHT(drv_name), \
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/libata.h:1399:16: note: expanded from macro '__ATA_BASE_SHT'
.can_queue = ATA_DEF_QUEUE, \
^~~~~~~~~~~~~
drivers/ata/ahci_tegra.c:477:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
AHCI_SHT(DRV_NAME),
^~~~~~~~~~~~~~~~~~
drivers/ata/ahci.h:389:17: note: expanded from macro 'AHCI_SHT'
.sdev_attrs = ahci_sdev_attrs
^~~~~~~~~~~~~~~
drivers/ata/ahci_tegra.c:477:2: note: previous initialization is here
AHCI_SHT(DRV_NAME),
^~~~~~~~~~~~~~~~~~
drivers/ata/ahci.h:384:2: note: expanded from macro 'AHCI_SHT'
ATA_NCQ_SHT(drv_name), \
^~~~~~~~~~~~~~~~~~~~~
include/linux/libata.h:1418:17: note: expanded from macro 'ATA_NCQ_SHT'
.sdev_attrs = ata_ncq_sdev_attrs, \
^~~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
--
In file included from drivers/ata/ahci_qoriq.c:18:
In file included from include/linux/libata.h:21:
In file included from include/scsi/scsi_host.h:11:
>> include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
if (rq->tag != BLK_MQ_NO_TAG)
^
drivers/ata/ahci_qoriq.c:160:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
AHCI_SHT(DRV_NAME),
^~~~~~~~~~~~~~~~~~
drivers/ata/ahci.h:385:16: note: expanded from macro 'AHCI_SHT'
.can_queue = AHCI_MAX_CMDS, \
^~~~~~~~~~~~~
drivers/ata/ahci_qoriq.c:160:2: note: previous initialization is here
AHCI_SHT(DRV_NAME),
^~~~~~~~~~~~~~~~~~
drivers/ata/ahci.h:384:2: note: expanded from macro 'AHCI_SHT'
ATA_NCQ_SHT(drv_name), \
^~~~~~~~~~~~~~~~~~~~~
include/linux/libata.h:1417:2: note: expanded from macro 'ATA_NCQ_SHT'
__ATA_BASE_SHT(drv_name), \
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/libata.h:1399:16: note: expanded from macro '__ATA_BASE_SHT'
.can_queue = ATA_DEF_QUEUE, \
^~~~~~~~~~~~~
drivers/ata/ahci_qoriq.c:160:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
AHCI_SHT(DRV_NAME),
^~~~~~~~~~~~~~~~~~
drivers/ata/ahci.h:389:17: note: expanded from macro 'AHCI_SHT'
.sdev_attrs = ahci_sdev_attrs
^~~~~~~~~~~~~~~
drivers/ata/ahci_qoriq.c:160:2: note: previous initialization is here
AHCI_SHT(DRV_NAME),
^~~~~~~~~~~~~~~~~~
drivers/ata/ahci.h:384:2: note: expanded from macro 'AHCI_SHT'
ATA_NCQ_SHT(drv_name), \
^~~~~~~~~~~~~~~~~~~~~
include/linux/libata.h:1418:17: note: expanded from macro 'ATA_NCQ_SHT'
.sdev_attrs = ata_ncq_sdev_attrs, \
^~~~~~~~~~~~~~~~~~
drivers/ata/ahci_qoriq.c:277:21: warning: cast to smaller integer type 'enum ahci_qoriq_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
qoriq_priv->type = (enum ahci_qoriq_type)of_id->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings and 1 error generated.
--
In file included from drivers/scsi/scsi_sysfs.c:19:
In file included from include/scsi/scsi_host.h:11:
>> include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
if (rq->tag != BLK_MQ_NO_TAG)
^
drivers/scsi/scsi_sysfs.c:373:1: warning: format specifies type 'short' but the argument has type 'int' [-Wformat]
shost_rd_attr(can_queue, "%hd\n");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%d
drivers/scsi/scsi_sysfs.c:176:45: note: expanded from macro 'shost_rd_attr'
#define shost_rd_attr(field, format_string) \
^
drivers/scsi/scsi_sysfs.c:173:2: note: expanded from macro '\
shost_rd_attr2'
shost_show_function(name, field, format_string) \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/scsi_sysfs.c:165:43: note: expanded from macro 'shost_show_function'
return snprintf (buf, 20, format_string, shost->field); \
~~~~~~~~~~~~~ ^~~~~~~~~~~~
1 warning and 1 error generated.
--
In file included from drivers/scsi/scsi_sysfs.c:19:
In file included from include/scsi/scsi_host.h:11:
>> include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
if (rq->tag != BLK_MQ_NO_TAG)
^
drivers/scsi/scsi_sysfs.c:373:1: warning: format specifies type 'short' but the argument has type 'int' [-Wformat]
shost_rd_attr(can_queue, "%hd\n");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%d
drivers/scsi/scsi_sysfs.c:176:45: note: expanded from macro 'shost_rd_attr'
#define shost_rd_attr(field, format_string) \
^
drivers/scsi/scsi_sysfs.c:173:2: note: expanded from macro '\
shost_rd_attr2'
shost_show_function(name, field, format_string) \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/scsi_sysfs.c:165:43: note: expanded from macro 'shost_show_function'
return snprintf (buf, 20, format_string, shost->field); \
~~~~~~~~~~~~~ ^~~~~~~~~~~~
drivers/scsi/scsi_sysfs.c:1027:10: fatal error: 'scsi_devinfo_tbl.c' file not found
#include "scsi_devinfo_tbl.c"
^~~~~~~~~~~~~~~~~~~~
1 warning and 2 errors generated.
--
In file included from drivers/nvme/host/core.c:8:
>> include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
if (rq->tag != BLK_MQ_NO_TAG)
^
In file included from drivers/nvme/host/core.c:29:
In file included from drivers/nvme/host/trace.h:175:
include/trace/define_trace.h:95:10: fatal error: './trace.h' file not found
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/trace/define_trace.h:90:32: note: expanded from macro 'TRACE_INCLUDE'
# define TRACE_INCLUDE(system) __TRACE_INCLUDE(system)
^~~~~~~~~~~~~~~~~~~~~~~
include/trace/define_trace.h:87:34: note: expanded from macro '__TRACE_INCLUDE'
# define __TRACE_INCLUDE(system) __stringify(TRACE_INCLUDE_PATH/system.h)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/stringify.h:10:27: note: expanded from macro '__stringify'
#define __stringify(x...) __stringify_1(x)
^~~~~~~~~~~~~~~~
include/linux/stringify.h:9:29: note: expanded from macro '__stringify_1'
#define __stringify_1(x...) #x
^~
<scratch space>:31:1: note: expanded from here
"./trace.h"
^~~~~~~~~~~
2 errors generated.
# 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: 36817 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] blk-mq: use BLK_MQ_NO_TAG for no tag
2020-08-23 15:44 [PATCH] blk-mq: use BLK_MQ_NO_TAG for no tag Xianting Tian
2020-08-23 19:44 ` kernel test robot
2020-08-23 20:56 ` kernel test robot
@ 2020-08-23 20:58 ` Jens Axboe
2020-08-24 6:18 ` Tianxianting
2020-08-24 1:04 ` kernel test robot
3 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2020-08-23 20:58 UTC (permalink / raw)
To: Xianting Tian, ast, daniel, kafai, songliubraving, yhs, andriin,
john.fastabend, kpsingh
Cc: linux-block, linux-kernel
On 8/23/20 9:44 AM, Xianting Tian wrote:
> Replace various magic -1 constants for tags with BLK_MQ_NO_TAG.
Doesn't look like this patch was even compiled...
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] blk-mq: use BLK_MQ_NO_TAG for no tag
2020-08-23 15:44 [PATCH] blk-mq: use BLK_MQ_NO_TAG for no tag Xianting Tian
` (2 preceding siblings ...)
2020-08-23 20:58 ` Jens Axboe
@ 2020-08-24 1:04 ` kernel test robot
3 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2020-08-24 1:04 UTC (permalink / raw)
To: Xianting Tian, axboe, ast, daniel, kafai, songliubraving, yhs,
andriin, john.fastabend, kpsingh
Cc: kbuild-all, clang-built-linux, linux-block
[-- Attachment #1: Type: text/plain, Size: 28026 bytes --]
Hi Xianting,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on block/for-next]
[also build test WARNING on linux/master linus/master v5.9-rc2 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: mips-randconfig-r031-20200823 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b587ca93be114d07ec3bf654add97d7872325281)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/scsi/dpt_i2o.c:62:
In file included from include/scsi/scsi_cmnd.h:13:
In file included from include/scsi/scsi_request.h:5:
include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
if (rq->tag != BLK_MQ_NO_TAG)
^
include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
>> drivers/scsi/dpt_i2o.c:893:31: warning: shift count >= width of type [-Wshift-count-overflow]
dma_set_mask(&pDev->dev, DMA_BIT_MASK(64)) == 0)
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/scsi/dpt_i2o.c:893:31: warning: shift count >= width of type [-Wshift-count-overflow]
dma_set_mask(&pDev->dev, DMA_BIT_MASK(64)) == 0)
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/scsi/dpt_i2o.c:893:31: warning: shift count >= width of type [-Wshift-count-overflow]
dma_set_mask(&pDev->dev, DMA_BIT_MASK(64)) == 0)
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
~~~~~~~~~~~~~~~~~^~~~~
include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
(cond) ? \
^~~~
3 warnings and 3 errors generated.
--
In file included from drivers/scsi/hpsa.c:39:
In file included from include/scsi/scsi_cmnd.h:13:
In file included from include/scsi/scsi_request.h:5:
include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
if (rq->tag != BLK_MQ_NO_TAG)
^
include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
>> drivers/scsi/hpsa.c:8713:32: warning: shift count >= width of type [-Wshift-count-overflow]
rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
1 warning and 3 errors generated.
--
In file included from drivers/scsi/3w-9xxx.c:97:
In file included from include/scsi/scsi_host.h:11:
include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
if (rq->tag != BLK_MQ_NO_TAG)
^
include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
>> drivers/scsi/3w-9xxx.c:2023:49: warning: shift count >= width of type [-Wshift-count-overflow]
retval = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
drivers/scsi/3w-9xxx.c:2245:49: warning: shift count >= width of type [-Wshift-count-overflow]
retval = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
2 warnings and 3 errors generated.
--
In file included from drivers/scsi/arcmsr/arcmsr_hba.c:65:
In file included from include/scsi/scsi_host.h:11:
include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
if (rq->tag != BLK_MQ_NO_TAG)
^
include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
>> drivers/scsi/arcmsr/arcmsr_hba.c:930:34: warning: shift count >= width of type [-Wshift-count-overflow]
dma_set_mask(&pcidev->dev, DMA_BIT_MASK(64)))
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/scsi/arcmsr/arcmsr_hba.c:930:34: warning: shift count >= width of type [-Wshift-count-overflow]
dma_set_mask(&pcidev->dev, DMA_BIT_MASK(64)))
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/scsi/arcmsr/arcmsr_hba.c:930:34: warning: shift count >= width of type [-Wshift-count-overflow]
dma_set_mask(&pcidev->dev, DMA_BIT_MASK(64)))
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
~~~~~~~~~~~~~~~~~^~~~~
include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
(cond) ? \
^~~~
drivers/scsi/arcmsr/arcmsr_hba.c:932:43: warning: shift count >= width of type [-Wshift-count-overflow]
if (dma_set_coherent_mask(&pcidev->dev, DMA_BIT_MASK(64)) ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/scsi/arcmsr/arcmsr_hba.c:933:47: warning: shift count >= width of type [-Wshift-count-overflow]
dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(64))) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/scsi/arcmsr/arcmsr_hba.c:932:43: warning: shift count >= width of type [-Wshift-count-overflow]
if (dma_set_coherent_mask(&pcidev->dev, DMA_BIT_MASK(64)) ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/scsi/arcmsr/arcmsr_hba.c:933:47: warning: shift count >= width of type [-Wshift-count-overflow]
dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(64))) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/scsi/arcmsr/arcmsr_hba.c:932:43: warning: shift count >= width of type [-Wshift-count-overflow]
if (dma_set_coherent_mask(&pcidev->dev, DMA_BIT_MASK(64)) ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
~~~~~~~~~~~~~~~~~^~~~~
include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
(cond) ? \
^~~~
drivers/scsi/arcmsr/arcmsr_hba.c:933:47: warning: shift count >= width of type [-Wshift-count-overflow]
dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(64))) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
~~~~~~~~~~~~~~~~~^~~~~
include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
(cond) ? \
^~~~
9 warnings and 3 errors generated.
--
In file included from drivers/scsi/ufs/ufshcd.c:18:
In file included from drivers/scsi/ufs/ufshcd.h:41:
In file included from include/scsi/scsi_cmnd.h:13:
In file included from include/scsi/scsi_request.h:5:
include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
if (rq->tag != BLK_MQ_NO_TAG)
^
include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
In file included from drivers/scsi/ufs/ufshcd.c:28:
In file included from include/trace/events/ufs.h:313:
In file included from include/trace/define_trace.h:102:
In file included from include/trace/trace_events.h:21:
In file included from include/linux/trace_events.h:6:
In file included from include/linux/ring_buffer.h:7:
include/linux/poll.h:142:27: warning: division by zero is undefined [-Wdivision-by-zero]
M(RDNORM) | M(RDBAND) | M(WRNORM) | M(WRBAND) |
^~~~~~~~~
include/linux/poll.h:140:32: note: expanded from macro 'M'
#define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/poll.h:126:51: note: expanded from macro '__MAP'
(from < to ? (v & from) * (to/from) : (v & from) / (from/to))
^ ~~~~~~~~~
include/linux/poll.h:142:39: warning: division by zero is undefined [-Wdivision-by-zero]
M(RDNORM) | M(RDBAND) | M(WRNORM) | M(WRBAND) |
^~~~~~~~~
include/linux/poll.h:140:32: note: expanded from macro 'M'
#define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/poll.h:126:51: note: expanded from macro '__MAP'
(from < to ? (v & from) * (to/from) : (v & from) / (from/to))
^ ~~~~~~~~~
>> drivers/scsi/ufs/ufshcd.c:8711:44: warning: shift count >= width of type [-Wshift-count-overflow]
if (!dma_set_mask_and_coherent(hba->dev, DMA_BIT_MASK(64)))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/scsi/ufs/ufshcd.c:8711:44: warning: shift count >= width of type [-Wshift-count-overflow]
if (!dma_set_mask_and_coherent(hba->dev, DMA_BIT_MASK(64)))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/scsi/ufs/ufshcd.c:8711:44: warning: shift count >= width of type [-Wshift-count-overflow]
if (!dma_set_mask_and_coherent(hba->dev, DMA_BIT_MASK(64)))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
~~~~~~~~~~~~~~~~~^~~~~
include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
(cond) ? \
^~~~
5 warnings and 3 errors generated.
--
In file included from drivers/block/skd_main.c:17:
include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
if (rq->tag != BLK_MQ_NO_TAG)
^
include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
include/linux/blk-mq.h:572:17: error: use of undeclared identifier 'BLK_MQ_NO_TAG'
>> drivers/block/skd_main.c:3183:45: warning: shift count >= width of type [-Wshift-count-overflow]
rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
drivers/block/skd_main.c:3372:45: warning: shift count >= width of type [-Wshift-count-overflow]
rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
2 warnings and 3 errors generated.
..
# 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 +893 drivers/scsi/dpt_i2o.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 864
^1da177e4c3f41 Linus Torvalds 2005-04-16 865 adpt_hba* pHba = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 866 adpt_hba* p = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 867 ulong base_addr0_phys = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 868 ulong base_addr1_phys = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 869 u32 hba_map0_area_size = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 870 u32 hba_map1_area_size = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 871 void __iomem *base_addr_virt = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 872 void __iomem *msg_addr_virt = NULL;
62ac5aedc51485 Miquel van Smoorenburg 2008-05-02 873 int dma64 = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 874
^1da177e4c3f41 Linus Torvalds 2005-04-16 875 int raptorFlag = FALSE;
^1da177e4c3f41 Linus Torvalds 2005-04-16 876
^1da177e4c3f41 Linus Torvalds 2005-04-16 877 if(pci_enable_device(pDev)) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 878 return -EINVAL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 879 }
9638d89a75776a Salyzyn, Mark 2006-01-12 880
9638d89a75776a Salyzyn, Mark 2006-01-12 881 if (pci_request_regions(pDev, "dpt_i2o")) {
9638d89a75776a Salyzyn, Mark 2006-01-12 882 PERROR("dpti: adpt_config_hba: pci request region failed\n");
9638d89a75776a Salyzyn, Mark 2006-01-12 883 return -EINVAL;
9638d89a75776a Salyzyn, Mark 2006-01-12 884 }
9638d89a75776a Salyzyn, Mark 2006-01-12 885
^1da177e4c3f41 Linus Torvalds 2005-04-16 886 pci_set_master(pDev);
62ac5aedc51485 Miquel van Smoorenburg 2008-05-02 887
62ac5aedc51485 Miquel van Smoorenburg 2008-05-02 888 /*
62ac5aedc51485 Miquel van Smoorenburg 2008-05-02 889 * See if we should enable dma64 mode.
62ac5aedc51485 Miquel van Smoorenburg 2008-05-02 890 */
62ac5aedc51485 Miquel van Smoorenburg 2008-05-02 891 if (sizeof(dma_addr_t) > 4 &&
c79cd9a24ef71c Christoph Hellwig 2018-10-18 892 dma_get_required_mask(&pDev->dev) > DMA_BIT_MASK(32) &&
c79cd9a24ef71c Christoph Hellwig 2018-10-18 @893 dma_set_mask(&pDev->dev, DMA_BIT_MASK(64)) == 0)
62ac5aedc51485 Miquel van Smoorenburg 2008-05-02 894 dma64 = 1;
c79cd9a24ef71c Christoph Hellwig 2018-10-18 895
c79cd9a24ef71c Christoph Hellwig 2018-10-18 896 if (!dma64 && dma_set_mask(&pDev->dev, DMA_BIT_MASK(32)) != 0)
^1da177e4c3f41 Linus Torvalds 2005-04-16 897 return -EINVAL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 898
67af2b060e027c Miquel van Smoorenburg 2008-05-02 899 /* adapter only supports message blocks below 4GB */
c79cd9a24ef71c Christoph Hellwig 2018-10-18 900 dma_set_coherent_mask(&pDev->dev, DMA_BIT_MASK(32));
67af2b060e027c Miquel van Smoorenburg 2008-05-02 901
^1da177e4c3f41 Linus Torvalds 2005-04-16 902 base_addr0_phys = pci_resource_start(pDev,0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 903 hba_map0_area_size = pci_resource_len(pDev,0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 904
^1da177e4c3f41 Linus Torvalds 2005-04-16 905 // Check if standard PCI card or single BAR Raptor
^1da177e4c3f41 Linus Torvalds 2005-04-16 906 if(pDev->device == PCI_DPT_DEVICE_ID){
^1da177e4c3f41 Linus Torvalds 2005-04-16 907 if(pDev->subsystem_device >=0xc032 && pDev->subsystem_device <= 0xc03b){
^1da177e4c3f41 Linus Torvalds 2005-04-16 908 // Raptor card with this device id needs 4M
^1da177e4c3f41 Linus Torvalds 2005-04-16 909 hba_map0_area_size = 0x400000;
^1da177e4c3f41 Linus Torvalds 2005-04-16 910 } else { // Not Raptor - it is a PCI card
^1da177e4c3f41 Linus Torvalds 2005-04-16 911 if(hba_map0_area_size > 0x100000 ){
^1da177e4c3f41 Linus Torvalds 2005-04-16 912 hba_map0_area_size = 0x100000;
^1da177e4c3f41 Linus Torvalds 2005-04-16 913 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 914 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 915 } else {// Raptor split BAR config
^1da177e4c3f41 Linus Torvalds 2005-04-16 916 // Use BAR1 in this configuration
^1da177e4c3f41 Linus Torvalds 2005-04-16 917 base_addr1_phys = pci_resource_start(pDev,1);
^1da177e4c3f41 Linus Torvalds 2005-04-16 918 hba_map1_area_size = pci_resource_len(pDev,1);
^1da177e4c3f41 Linus Torvalds 2005-04-16 919 raptorFlag = TRUE;
^1da177e4c3f41 Linus Torvalds 2005-04-16 920 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 921
---
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: 41137 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] blk-mq: use BLK_MQ_NO_TAG for no tag
2020-08-23 20:58 ` Jens Axboe
@ 2020-08-24 6:18 ` Tianxianting
0 siblings, 0 replies; 6+ messages in thread
From: Tianxianting @ 2020-08-24 6:18 UTC (permalink / raw)
To: Jens Axboe, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com,
songliubraving@fb.com, yhs@fb.com, andriin@fb.com,
john.fastabend@gmail.com, kpsingh@chromium.org
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Hi Jens
Sorry to trouble you, I am very sorry for taking it for granted for the patch compile.
I checked, compile for the two changed files are OK:
block/blk-core.c
block/blk-mq-sched.c
Compile failed for the function in below header file:
include/linux/blk-mq.h: request_to_qc_t()
- if (rq->tag != -1)
+ if (rq->tag != BLK_MQ_NO_TAG)
BLK_MQ_NO_TAG is defined in 'block/blk-mq-tag.h', if I include this header file in 'include/linux/blk-mq.h' via '#include "../../block/blk-mq-tag.h"',
Many other similar compile failed happen, for example:
In file included from ./include/linux/../../block/blk-mq-tag.h:5:0,
from ./include/linux/blk-mq.h:8,
from block/blk.h:6,
from block/bio.c:24:
./include/linux/../../block/blk-mq.h:21:29: error: ‘HCTX_MAX_TYPES’ undeclared here (not in a function); did you mean ‘KOBJ_NS_TYPES’?
struct list_head rq_lists[HCTX_MAX_TYPES];
^~~~~~~~~~~~~~
If I moved below BLK_MQ_NO_TAG definition to 'include/linux/blk-mq.h', all kernel compiles are ok with the patch.
enum {
BLK_MQ_NO_TAG = -1U,
BLK_MQ_TAG_MIN = 1,
BLK_MQ_TAG_MAX = BLK_MQ_NO_TAG - 1,
};
Will you accept above moving of BLK_MQ_NO_TAG to 'include/linux/blk-mq.h'?
Thanks
-----Original Message-----
From: Jens Axboe [mailto:axboe@kernel.dk]
Sent: Monday, August 24, 2020 4:58 AM
To: tianxianting (RD) <tian.xianting@h3c.com>; ast@kernel.org; daniel@iogearbox.net; kafai@fb.com; songliubraving@fb.com; yhs@fb.com; andriin@fb.com; john.fastabend@gmail.com; kpsingh@chromium.org
Cc: linux-block@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH] blk-mq: use BLK_MQ_NO_TAG for no tag
On 8/23/20 9:44 AM, Xianting Tian wrote:
> Replace various magic -1 constants for tags with BLK_MQ_NO_TAG.
Doesn't look like this patch was even compiled...
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-08-24 7:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-23 15:44 [PATCH] blk-mq: use BLK_MQ_NO_TAG for no tag Xianting Tian
2020-08-23 19:44 ` kernel test robot
2020-08-23 20:56 ` kernel test robot
2020-08-23 20:58 ` Jens Axboe
2020-08-24 6:18 ` Tianxianting
2020-08-24 1:04 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox