tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git eh-rework.v2 head: 7603e2e1f37e470064b8c865b5d6470137baa79b commit: 7285b348b4837b6bcbeffaf829372e63cd180b09 [50/51] scsi: Do not allocate scsi command in scsi_ioctl_reset() config: x86_64-randconfig-a006-20210816 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commit/?id=7285b348b4837b6bcbeffaf829372e63cd180b09 git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git git fetch --no-tags hare-scsi-devel eh-rework.v2 git checkout 7285b348b4837b6bcbeffaf829372e63cd180b09 # save the attached .config to linux build tree mkdir build_dir make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/scsi/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/scsi/scsi_error.c: In function 'scsi_try_host_reset': drivers/scsi/scsi_error.c:821:4: error: implicit declaration of function '__scsi_report_device_reset'; did you mean 'scsi_report_device_reset'? [-Werror=implicit-function-declaration] 821 | __scsi_report_device_reset(sdev); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | scsi_report_device_reset drivers/scsi/scsi_error.c: At top level: >> drivers/scsi/scsi_error.c:859:13: warning: conflicting types for '__scsi_report_device_reset' 859 | static void __scsi_report_device_reset(struct scsi_device *sdev, void *data) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_error.c:859:13: error: static declaration of '__scsi_report_device_reset' follows non-static declaration drivers/scsi/scsi_error.c:821:4: note: previous implicit declaration of '__scsi_report_device_reset' was here 821 | __scsi_report_device_reset(sdev); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_error.c: In function 'scsi_try_target_reset': drivers/scsi/scsi_error.c:893:5: error: too few arguments to function '__scsi_report_device_reset' 893 | __scsi_report_device_reset(sdev); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_error.c:859:13: note: declared here 859 | static void __scsi_report_device_reset(struct scsi_device *sdev, void *data) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_error.c: At top level: drivers/scsi/scsi_error.c:1217:6: warning: no previous prototype for '__scsi_eh_finish_cmd' [-Wmissing-prototypes] 1217 | void __scsi_eh_finish_cmd(struct scsi_cmnd *scmd, struct list_head *done_q, | ^~~~~~~~~~~~~~~~~~~~ drivers/scsi/scsi_error.c: In function 'scsi_ioctl_reset': drivers/scsi/scsi_error.c:2443:1: warning: label 'out_put_autopm_host' defined but not used [-Wunused-label] 2443 | out_put_autopm_host: | ^~~~~~~~~~~~~~~~~~~ At top level: drivers/scsi/scsi_error.c:2365:1: warning: 'scsi_reset_provider_done_command' defined but not used [-Wunused-function] 2365 | scsi_reset_provider_done_command(struct scsi_cmnd *scmd) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/__scsi_report_device_reset +859 drivers/scsi/scsi_error.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 796 292148f8bb2b5d Brian King 2007-01-30 797 /** 292148f8bb2b5d Brian King 2007-01-30 798 * scsi_try_host_reset - ask host adapter to reset itself 7285b348b4837b Hannes Reinecke 2021-08-17 799 * @host: SCSI host to be reset. dc8875e1078961 Randy Dunlap 2007-11-15 800 */ 7285b348b4837b Hannes Reinecke 2021-08-17 801 static enum scsi_disposition scsi_try_host_reset(struct Scsi_Host *host) 292148f8bb2b5d Brian King 2007-01-30 802 { 292148f8bb2b5d Brian King 2007-01-30 803 unsigned long flags; b8e162f9e7e2da Bart Van Assche 2021-04-15 804 enum scsi_disposition rtn; 0bf8c869701039 Jesper Juhl 2011-03-21 805 struct scsi_host_template *hostt = host->hostt; 7285b348b4837b Hannes Reinecke 2021-08-17 806 struct scsi_device *sdev; 292148f8bb2b5d Brian King 2007-01-30 807 91921e016a2199 Hannes Reinecke 2014-06-25 808 SCSI_LOG_ERROR_RECOVERY(3, 91921e016a2199 Hannes Reinecke 2014-06-25 809 shost_printk(KERN_INFO, host, "Snd Host RST\n")); 292148f8bb2b5d Brian King 2007-01-30 810 0bf8c869701039 Jesper Juhl 2011-03-21 811 if (!hostt->eh_host_reset_handler) 292148f8bb2b5d Brian King 2007-01-30 812 return FAILED; 292148f8bb2b5d Brian King 2007-01-30 813 1b973982217b36 Hannes Reinecke 2021-08-16 814 rtn = hostt->eh_host_reset_handler(host); 292148f8bb2b5d Brian King 2007-01-30 815 292148f8bb2b5d Brian King 2007-01-30 816 if (rtn == SUCCESS) { 0bf8c869701039 Jesper Juhl 2011-03-21 817 if (!hostt->skip_settle_delay) 292148f8bb2b5d Brian King 2007-01-30 818 ssleep(HOST_RESET_SETTLE_TIME); 0bf8c869701039 Jesper Juhl 2011-03-21 819 spin_lock_irqsave(host->host_lock, flags); 7285b348b4837b Hannes Reinecke 2021-08-17 820 __shost_for_each_device(sdev, host) 7285b348b4837b Hannes Reinecke 2021-08-17 @821 __scsi_report_device_reset(sdev); 0bf8c869701039 Jesper Juhl 2011-03-21 822 spin_unlock_irqrestore(host->host_lock, flags); 292148f8bb2b5d Brian King 2007-01-30 823 } 292148f8bb2b5d Brian King 2007-01-30 824 292148f8bb2b5d Brian King 2007-01-30 825 return rtn; 292148f8bb2b5d Brian King 2007-01-30 826 } 292148f8bb2b5d Brian King 2007-01-30 827 292148f8bb2b5d Brian King 2007-01-30 828 /** 292148f8bb2b5d Brian King 2007-01-30 829 * scsi_try_bus_reset - ask host to perform a bus reset 7285b348b4837b Hannes Reinecke 2021-08-17 830 * @host: SCSI host to send bus reset. 7285b348b4837b Hannes Reinecke 2021-08-17 831 * @channel: Number of the bus to be reset dc8875e1078961 Randy Dunlap 2007-11-15 832 */ 7285b348b4837b Hannes Reinecke 2021-08-17 833 static enum scsi_disposition scsi_try_bus_reset(struct Scsi_Host *host, 7285b348b4837b Hannes Reinecke 2021-08-17 834 int channel) 292148f8bb2b5d Brian King 2007-01-30 835 { 292148f8bb2b5d Brian King 2007-01-30 836 unsigned long flags; b8e162f9e7e2da Bart Van Assche 2021-04-15 837 enum scsi_disposition rtn; 0bf8c869701039 Jesper Juhl 2011-03-21 838 struct scsi_host_template *hostt = host->hostt; 292148f8bb2b5d Brian King 2007-01-30 839 7285b348b4837b Hannes Reinecke 2021-08-17 840 SCSI_LOG_ERROR_RECOVERY(3, shost_printk(KERN_INFO, host, 7285b348b4837b Hannes Reinecke 2021-08-17 841 "%s: Snd Bus RST to bus %d\n", __func__, channel)); 292148f8bb2b5d Brian King 2007-01-30 842 0bf8c869701039 Jesper Juhl 2011-03-21 843 if (!hostt->eh_bus_reset_handler) 292148f8bb2b5d Brian King 2007-01-30 844 return FAILED; 292148f8bb2b5d Brian King 2007-01-30 845 7285b348b4837b Hannes Reinecke 2021-08-17 846 rtn = hostt->eh_bus_reset_handler(host, channel); 292148f8bb2b5d Brian King 2007-01-30 847 292148f8bb2b5d Brian King 2007-01-30 848 if (rtn == SUCCESS) { 0bf8c869701039 Jesper Juhl 2011-03-21 849 if (!hostt->skip_settle_delay) 292148f8bb2b5d Brian King 2007-01-30 850 ssleep(BUS_RESET_SETTLE_TIME); 0bf8c869701039 Jesper Juhl 2011-03-21 851 spin_lock_irqsave(host->host_lock, flags); 7285b348b4837b Hannes Reinecke 2021-08-17 852 scsi_report_bus_reset(host, channel); 0bf8c869701039 Jesper Juhl 2011-03-21 853 spin_unlock_irqrestore(host->host_lock, flags); 292148f8bb2b5d Brian King 2007-01-30 854 } 292148f8bb2b5d Brian King 2007-01-30 855 292148f8bb2b5d Brian King 2007-01-30 856 return rtn; 292148f8bb2b5d Brian King 2007-01-30 857 } 292148f8bb2b5d Brian King 2007-01-30 858 30bd7df8ced23e Mike Christie 2008-02-29 @859 static void __scsi_report_device_reset(struct scsi_device *sdev, void *data) 30bd7df8ced23e Mike Christie 2008-02-29 860 { 30bd7df8ced23e Mike Christie 2008-02-29 861 sdev->was_reset = 1; 30bd7df8ced23e Mike Christie 2008-02-29 862 sdev->expecting_cc_ua = 1; 30bd7df8ced23e Mike Christie 2008-02-29 863 } 30bd7df8ced23e Mike Christie 2008-02-29 864 :::::: The code at line 859 was first introduced by commit :::::: 30bd7df8ced23eefec87a5cda96dc99b002ed9da [SCSI] scsi_error: add target reset handler :::::: TO: Mike Christie :::::: CC: James Bottomley --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org