tree: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next head: 82472fa2e160c47a429783b6f45d375d3253fbaf commit: 82472fa2e160c47a429783b6f45d375d3253fbaf [5/5] Merge branch 'fixes' into for-next config: alpha-randconfig-r021-20220916 (https://download.01.org/0day-ci/archive/20220916/202209162004.IQuPWTo3-lkp@xxxxxxxxx/config) compiler: alpha-linux-gcc (GCC) 12.1.0 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 # https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git/commit/?id=82472fa2e160c47a429783b6f45d375d3253fbaf git remote add jejb-scsi https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git git fetch --no-tags jejb-scsi for-next git checkout 82472fa2e160c47a429783b6f45d375d3253fbaf # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash drivers/scsi/mpt3sas/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <lkp@xxxxxxxxx> All error/warnings (new ones prefixed by >>): drivers/scsi/mpt3sas/mpt3sas_base.c: In function '_base_config_dma_addressing': >> drivers/scsi/mpt3sas/mpt3sas_base.c:2995:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation] 2995 | if (ioc->is_mcpu_endpoint || sizeof(dma_addr_t) == 4 || | ^~ drivers/scsi/mpt3sas/mpt3sas_base.c:2998:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' 2998 | coherent_dma_mask = dma_mask = DMA_BIT_MASK(32); | ^~~~~~~~~~~~~~~~~ >> drivers/scsi/mpt3sas/mpt3sas_base.c:2993:13: warning: variable 'coherent_dma_mask' set but not used [-Wunused-but-set-variable] 2993 | u64 coherent_dma_mask, dma_mask; | ^~~~~~~~~~~~~~~~~ drivers/scsi/mpt3sas/mpt3sas_base.c:2992:24: warning: unused variable 's' [-Wunused-variable] 2992 | struct sysinfo s; | ^ drivers/scsi/mpt3sas/mpt3sas_base.c:3000:9: error: no return statement in function returning non-void [-Werror=return-type] 3000 | } else if (ioc->hba_mpi_version_belonged > MPI2_VERSION) { | ^ drivers/scsi/mpt3sas/mpt3sas_base.c: At top level: >> drivers/scsi/mpt3sas/mpt3sas_base.c:3000:11: error: expected identifier or '(' before 'else' 3000 | } else if (ioc->hba_mpi_version_belonged > MPI2_VERSION) { | ^~~~ drivers/scsi/mpt3sas/mpt3sas_base.c:3003:11: error: expected identifier or '(' before 'else' 3003 | } else { | ^~~~ >> drivers/scsi/mpt3sas/mpt3sas_base.c:3008:9: error: expected identifier or '(' before 'if' 3008 | if (ioc->use_32bit_dma) | ^~ drivers/scsi/mpt3sas/mpt3sas_base.c:3011:9: error: expected identifier or '(' before 'if' 3011 | if (dma_set_mask(&pdev->dev, dma_mask) || | ^~ drivers/scsi/mpt3sas/mpt3sas_base.c:3015:9: error: expected identifier or '(' before 'if' 3015 | if (ioc->dma_mask > 32) { | ^~ drivers/scsi/mpt3sas/mpt3sas_base.c:3018:11: error: expected identifier or '(' before 'else' 3018 | } else { | ^~~~ >> drivers/scsi/mpt3sas/mpt3sas_base.c:3023:20: error: expected declaration specifiers or '...' before '&' token 3023 | si_meminfo(&s); | ^ In file included from include/linux/kernel.h:29, from drivers/scsi/mpt3sas/mpt3sas_base.c:46: >> include/linux/printk.h:434:10: error: expected identifier or '(' before '{' token 434 | ({ \ | ^ include/linux/printk.h:464:26: note: in expansion of macro 'printk_index_wrap' 464 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~ include/linux/printk.h:537:9: note: in expansion of macro 'printk' 537 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~ drivers/scsi/mpt3sas/mpt3sas_base.h:189:9: note: in expansion of macro 'pr_info' 189 | pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__) | ^~~~~~~ drivers/scsi/mpt3sas/mpt3sas_base.c:3024:9: note: in expansion of macro 'ioc_info' 3024 | ioc_info(ioc, "%d BIT PCI BUS DMA ADDRESSING SUPPORTED, total mem (%ld kB)\n", | ^~~~~~~~ >> drivers/scsi/mpt3sas/mpt3sas_base.c:3027:9: error: expected identifier or '(' before 'return' 3027 | return 0; | ^~~~~~ >> drivers/scsi/mpt3sas/mpt3sas_base.c:3028:1: error: expected identifier or '(' before '}' token 3028 | } | ^ drivers/scsi/mpt3sas/mpt3sas_base.c:2106:1: warning: '_base_add_sg_single_64' defined but not used [-Wunused-function] 2106 | _base_add_sg_single_64(void *paddr, u32 flags_length, dma_addr_t dma_addr) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/mpt3sas/mpt3sas_base.c:2088:1: warning: '_base_add_sg_single_32' defined but not used [-Wunused-function] 2088 | _base_add_sg_single_32(void *paddr, u32 flags_length, dma_addr_t dma_addr) | ^~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +3000 drivers/scsi/mpt3sas/mpt3sas_base.c f92363d1235949 Sreekanth Reddy 2012-11-30 2981 f92363d1235949 Sreekanth Reddy 2012-11-30 2982 /** f92363d1235949 Sreekanth Reddy 2012-11-30 2983 * _base_config_dma_addressing - set dma addressing f92363d1235949 Sreekanth Reddy 2012-11-30 2984 * @ioc: per adapter object f92363d1235949 Sreekanth Reddy 2012-11-30 2985 * @pdev: PCI device struct f92363d1235949 Sreekanth Reddy 2012-11-30 2986 * 4beb4867f049ae Bart Van Assche 2018-06-15 2987 * Return: 0 for success, non-zero for failure. f92363d1235949 Sreekanth Reddy 2012-11-30 2988 */ f92363d1235949 Sreekanth Reddy 2012-11-30 2989 static int f92363d1235949 Sreekanth Reddy 2012-11-30 2990 _base_config_dma_addressing(struct MPT3SAS_ADAPTER *ioc, struct pci_dev *pdev) f92363d1235949 Sreekanth Reddy 2012-11-30 2991 { f92363d1235949 Sreekanth Reddy 2012-11-30 2992 struct sysinfo s; 9df650963bf6d6 Sreekanth Reddy 2022-08-25 @2993 u64 coherent_dma_mask, dma_mask; 1c2048bdc3f4ff Christoph Hellwig 2018-10-11 2994 9df650963bf6d6 Sreekanth Reddy 2022-08-25 @2995 if (ioc->is_mcpu_endpoint || sizeof(dma_addr_t) == 4 || e0e0747de0ea3d Sreekanth Reddy 2022-09-13 2996 dma_get_required_mask(&pdev->dev) <= DMA_BIT_MASK(32)) d6adc251dd2fed Suganath Prabu S 2021-03-05 2997 ioc->dma_mask = 32; 9df650963bf6d6 Sreekanth Reddy 2022-08-25 2998 coherent_dma_mask = dma_mask = DMA_BIT_MASK(32); ba27c5cf286df0 Christoph Hellwig 2020-04-23 2999 /* Set 63 bit DMA mask for all SAS3 and SAS35 controllers */ 9df650963bf6d6 Sreekanth Reddy 2022-08-25 @3000 } else if (ioc->hba_mpi_version_belonged > MPI2_VERSION) { d6adc251dd2fed Suganath Prabu S 2021-03-05 3001 ioc->dma_mask = 63; 9df650963bf6d6 Sreekanth Reddy 2022-08-25 3002 coherent_dma_mask = dma_mask = DMA_BIT_MASK(63); 9df650963bf6d6 Sreekanth Reddy 2022-08-25 3003 } else { d6adc251dd2fed Suganath Prabu S 2021-03-05 3004 ioc->dma_mask = 64; 9df650963bf6d6 Sreekanth Reddy 2022-08-25 3005 coherent_dma_mask = dma_mask = DMA_BIT_MASK(64); 9df650963bf6d6 Sreekanth Reddy 2022-08-25 3006 } 9df650963bf6d6 Sreekanth Reddy 2022-08-25 3007 9df650963bf6d6 Sreekanth Reddy 2022-08-25 @3008 if (ioc->use_32bit_dma) 9df650963bf6d6 Sreekanth Reddy 2022-08-25 3009 coherent_dma_mask = DMA_BIT_MASK(32); 1c2048bdc3f4ff Christoph Hellwig 2018-10-11 3010 9df650963bf6d6 Sreekanth Reddy 2022-08-25 3011 if (dma_set_mask(&pdev->dev, dma_mask) || 9df650963bf6d6 Sreekanth Reddy 2022-08-25 3012 dma_set_coherent_mask(&pdev->dev, coherent_dma_mask)) ba27c5cf286df0 Christoph Hellwig 2020-04-23 3013 return -ENODEV; 1c2048bdc3f4ff Christoph Hellwig 2018-10-11 3014 d6adc251dd2fed Suganath Prabu S 2021-03-05 3015 if (ioc->dma_mask > 32) { f92363d1235949 Sreekanth Reddy 2012-11-30 3016 ioc->base_add_sg_single = &_base_add_sg_single_64; f92363d1235949 Sreekanth Reddy 2012-11-30 3017 ioc->sge_size = sizeof(Mpi2SGESimple64_t); ba27c5cf286df0 Christoph Hellwig 2020-04-23 3018 } else { f92363d1235949 Sreekanth Reddy 2012-11-30 3019 ioc->base_add_sg_single = &_base_add_sg_single_32; f92363d1235949 Sreekanth Reddy 2012-11-30 3020 ioc->sge_size = sizeof(Mpi2SGESimple32_t); ba27c5cf286df0 Christoph Hellwig 2020-04-23 3021 } ba27c5cf286df0 Christoph Hellwig 2020-04-23 3022 f92363d1235949 Sreekanth Reddy 2012-11-30 @3023 si_meminfo(&s); 919d8a3f3fef99 Joe Perches 2018-09-17 3024 ioc_info(ioc, "%d BIT PCI BUS DMA ADDRESSING SUPPORTED, total mem (%ld kB)\n", d6adc251dd2fed Suganath Prabu S 2021-03-05 3025 ioc->dma_mask, convert_to_kb(s.totalram)); f92363d1235949 Sreekanth Reddy 2012-11-30 3026 f92363d1235949 Sreekanth Reddy 2012-11-30 @3027 return 0; f92363d1235949 Sreekanth Reddy 2012-11-30 @3028 } f92363d1235949 Sreekanth Reddy 2012-11-30 3029 :::::: The code at line 3000 was first introduced by commit :::::: 9df650963bf6d6c2c3fcd325d8c44ca2b99554fe scsi: mpt3sas: Don't change DMA mask while reallocating pools :::::: TO: Sreekanth Reddy <sreekanth.reddy@xxxxxxxxxxxx> :::::: CC: Martin K. Petersen <martin.petersen@xxxxxxxxxx> -- 0-DAY CI Kernel Test Service https://01.org/lkp