Hi Mike, I love your patch! Perhaps something to improve: [auto build test WARNING on mkp-scsi/for-next] [also build test WARNING on jejb-scsi/for-next device-mapper-dm/for-next linus/master v6.1-rc2 next-20221026] [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#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Mike-Christie/Use-block-pr_ops-in-LIO/20221027-072653 base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next patch link: https://lore.kernel.org/r/20221026231945.6609-5-michael.christie%40oracle.com patch subject: [PATCH v3 04/19] scsi: Add support for block PR read keys/reservation config: x86_64-allyesconfig compiler: gcc-11 (Debian 11.3.0-8) 11.3.0 reproduce (this is a W=1 build): # https://github.com/intel-lab-lkp/linux/commit/f8aa9652526890d87007c8a643bd69ac723c053b git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Mike-Christie/Use-block-pr_ops-in-LIO/20221027-072653 git checkout f8aa9652526890d87007c8a643bd69ac723c053b # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/scsi/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/scsi/sd.c: In function 'sd_pr_in_command': drivers/scsi/sd.c:1692:29: error: array type has incomplete element type 'struct scsi_failure' 1692 | struct scsi_failure failures[] = { | ^~~~~~~~ drivers/scsi/sd.c:1695:32: error: 'SCMD_FAILURE_ASC_ANY' undeclared (first use in this function) 1695 | .asc = SCMD_FAILURE_ASC_ANY, | ^~~~~~~~~~~~~~~~~~~~ drivers/scsi/sd.c:1695:32: note: each undeclared identifier is reported only once for each function it appears in drivers/scsi/sd.c:1696:33: error: 'SCMD_FAILURE_ASCQ_ANY' undeclared (first use in this function) 1696 | .ascq = SCMD_FAILURE_ASCQ_ANY, | ^~~~~~~~~~~~~~~~~~~~~ drivers/scsi/sd.c:1706:18: error: implicit declaration of function 'scsi_exec_req'; did you mean 'scsi_execute_req'? [-Werror=implicit-function-declaration] 1706 | result = scsi_exec_req(((struct scsi_exec_args) { | ^~~~~~~~~~~~~ | scsi_execute_req drivers/scsi/sd.c:1707:42: error: 'struct scsi_exec_args' has no member named 'sdev' 1707 | .sdev = sdev, | ^~~~ drivers/scsi/sd.c:1707:49: warning: excess elements in struct initializer 1707 | .sdev = sdev, | ^~~~ drivers/scsi/sd.c:1707:49: note: (near initialization for '(anonymous)') drivers/scsi/sd.c:1708:42: error: 'struct scsi_exec_args' has no member named 'cmd' 1708 | .cmd = cmd, | ^~~ drivers/scsi/sd.c:1708:48: warning: excess elements in struct initializer 1708 | .cmd = cmd, | ^~~ drivers/scsi/sd.c:1708:48: note: (near initialization for '(anonymous)') drivers/scsi/sd.c:1709:42: error: 'struct scsi_exec_args' has no member named 'data_dir' 1709 | .data_dir = DMA_FROM_DEVICE, | ^~~~~~~~ drivers/scsi/sd.c:1709:53: warning: excess elements in struct initializer 1709 | .data_dir = DMA_FROM_DEVICE, | ^~~~~~~~~~~~~~~ drivers/scsi/sd.c:1709:53: note: (near initialization for '(anonymous)') drivers/scsi/sd.c:1710:42: error: 'struct scsi_exec_args' has no member named 'buf' 1710 | .buf = data, | ^~~ drivers/scsi/sd.c:1710:48: warning: excess elements in struct initializer 1710 | .buf = data, | ^~~~ drivers/scsi/sd.c:1710:48: note: (near initialization for '(anonymous)') drivers/scsi/sd.c:1711:42: error: 'struct scsi_exec_args' has no member named 'buf_len' 1711 | .buf_len = data_len, | ^~~~~~~ drivers/scsi/sd.c:1711:52: warning: excess elements in struct initializer 1711 | .buf_len = data_len, | ^~~~~~~~ drivers/scsi/sd.c:1711:52: note: (near initialization for '(anonymous)') drivers/scsi/sd.c:1712:42: error: 'struct scsi_exec_args' has no member named 'sshdr' 1712 | .sshdr = &sshdr, | ^~~~~ drivers/scsi/sd.c:1712:50: warning: excess elements in struct initializer 1712 | .sshdr = &sshdr, | ^ drivers/scsi/sd.c:1712:50: note: (near initialization for '(anonymous)') drivers/scsi/sd.c:1713:42: error: 'struct scsi_exec_args' has no member named 'timeout' 1713 | .timeout = SD_TIMEOUT, | ^~~~~~~ In file included from drivers/scsi/sd.c:72: drivers/scsi/sd.h:15:33: warning: excess elements in struct initializer 15 | #define SD_TIMEOUT (30 * HZ) | ^ drivers/scsi/sd.c:1713:52: note: in expansion of macro 'SD_TIMEOUT' 1713 | .timeout = SD_TIMEOUT, | ^~~~~~~~~~ drivers/scsi/sd.h:15:33: note: (near initialization for '(anonymous)') 15 | #define SD_TIMEOUT (30 * HZ) | ^ drivers/scsi/sd.c:1713:52: note: in expansion of macro 'SD_TIMEOUT' 1713 | .timeout = SD_TIMEOUT, | ^~~~~~~~~~ drivers/scsi/sd.c:1714:42: error: 'struct scsi_exec_args' has no member named 'retries' 1714 | .retries = sdkp->max_retries, | ^~~~~~~ drivers/scsi/sd.c:1714:52: warning: excess elements in struct initializer 1714 | .retries = sdkp->max_retries, | ^~~~ drivers/scsi/sd.c:1714:52: note: (near initialization for '(anonymous)') drivers/scsi/sd.c:1715:42: error: 'struct scsi_exec_args' has no member named 'failures' 1715 | .failures = failures })); | ^~~~~~~~ drivers/scsi/sd.c:1715:53: warning: excess elements in struct initializer 1715 | .failures = failures })); | ^~~~~~~~ drivers/scsi/sd.c:1715:53: note: (near initialization for '(anonymous)') drivers/scsi/sd.c:1706:57: error: invalid use of undefined type 'struct scsi_exec_args' 1706 | result = scsi_exec_req(((struct scsi_exec_args) { | ^ >> drivers/scsi/sd.c:1692:29: warning: unused variable 'failures' [-Wunused-variable] 1692 | struct scsi_failure failures[] = { | ^~~~~~~~ cc1: some warnings being treated as errors vim +/failures +1692 drivers/scsi/sd.c 1684 1685 static int sd_pr_in_command(struct block_device *bdev, u8 sa, 1686 unsigned char *data, int data_len) 1687 { 1688 struct scsi_disk *sdkp = scsi_disk(bdev->bd_disk); 1689 struct scsi_device *sdev = sdkp->device; 1690 struct scsi_sense_hdr sshdr; 1691 u8 cmd[10] = { PERSISTENT_RESERVE_IN, sa }; > 1692 struct scsi_failure failures[] = { 1693 { 1694 .sense = UNIT_ATTENTION, 1695 .asc = SCMD_FAILURE_ASC_ANY, 1696 .ascq = SCMD_FAILURE_ASCQ_ANY, 1697 .allowed = 5, 1698 .result = SAM_STAT_CHECK_CONDITION, 1699 }, 1700 {}, 1701 }; 1702 int result; 1703 1704 put_unaligned_be16(data_len, &cmd[7]); 1705 1706 result = scsi_exec_req(((struct scsi_exec_args) { 1707 .sdev = sdev, 1708 .cmd = cmd, 1709 .data_dir = DMA_FROM_DEVICE, 1710 .buf = data, 1711 .buf_len = data_len, 1712 .sshdr = &sshdr, 1713 .timeout = SD_TIMEOUT, 1714 .retries = sdkp->max_retries, 1715 .failures = failures })); 1716 if (scsi_status_is_check_condition(result) && 1717 scsi_sense_valid(&sshdr)) { 1718 sdev_printk(KERN_INFO, sdev, "PR command failed: %d\n", result); 1719 scsi_print_sense_hdr(sdev, NULL, &sshdr); 1720 } 1721 1722 return result; 1723 } 1724 -- 0-DAY CI Kernel Test Service https://01.org/lkp