tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: e4cf7c25bae5c3b5089a3c23a897f450149caef2 commit: 2e5a6c3baccd31476ed00c3fbc413b48ddd87993 scsi: bfa: Convert bfad_reset_sdev_bflags() from a macro into a function date: 8 weeks ago config: sparc-randconfig-s052-20230101 compiler: sparc-linux-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2e5a6c3baccd31476ed00c3fbc413b48ddd87993 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 2e5a6c3baccd31476ed00c3fbc413b48ddd87993 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc SHELL=/bin/bash drivers/scsi/bfa/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) drivers/scsi/bfa/bfad_bsg.c:2391:25: sparse: sparse: cast to restricted __be32 drivers/scsi/bfa/bfad_bsg.c:2414:38: sparse: sparse: cast to restricted __be16 drivers/scsi/bfa/bfad_bsg.c:2415:38: sparse: sparse: cast to restricted __be16 drivers/scsi/bfa/bfad_bsg.c:2417:33: sparse: sparse: cast to restricted __be32 >> drivers/scsi/bfa/bfad_bsg.c:2553:50: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int const [usertype] scan_flags @@ got restricted blist_flags_t @@ drivers/scsi/bfa/bfad_bsg.c:2553:50: sparse: expected unsigned int const [usertype] scan_flags drivers/scsi/bfa/bfad_bsg.c:2553:50: sparse: got restricted blist_flags_t drivers/scsi/bfa/bfad_bsg.c:2562:51: sparse: sparse: invalid assignment: |= drivers/scsi/bfa/bfad_bsg.c:2562:51: sparse: left side has type restricted blist_flags_t drivers/scsi/bfa/bfad_bsg.c:2562:51: sparse: right side has type unsigned int drivers/scsi/bfa/bfad_bsg.c:2564:51: sparse: sparse: invalid assignment: &= drivers/scsi/bfa/bfad_bsg.c:2564:51: sparse: left side has type restricted blist_flags_t drivers/scsi/bfa/bfad_bsg.c:2564:51: sparse: right side has type unsigned int drivers/scsi/bfa/bfad_bsg.c:3407:34: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got void * @@ drivers/scsi/bfa/bfad_bsg.c:3407:34: sparse: expected void const [noderef] __user *from drivers/scsi/bfa/bfad_bsg.c:3407:34: sparse: got void * drivers/scsi/bfa/bfad_bsg.c:3561:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got void * @@ drivers/scsi/bfa/bfad_bsg.c:3561:27: sparse: expected void [noderef] __user *to drivers/scsi/bfa/bfad_bsg.c:3561:27: sparse: got void * vim +2553 drivers/scsi/bfa/bfad_bsg.c 2542 2543 /* 2544 * Set the SCSI device sdev_bflags - sdev_bflags are used by the 2545 * SCSI mid-layer to choose LUN Scanning mode REPORT_LUNS vs. Sequential Scan 2546 * 2547 * Internally iterates over all the ITNIM's part of the im_port & sets the 2548 * sdev_bflags for the scsi_device associated with LUN #0. 2549 */ 2550 static void bfad_reset_sdev_bflags(struct bfad_im_port_s *im_port, 2551 int lunmask_cfg) 2552 { > 2553 const u32 scan_flags = BLIST_NOREPORTLUN | BLIST_SPARSELUN; 2554 struct bfad_itnim_s *itnim; 2555 struct scsi_device *sdev; 2556 2557 list_for_each_entry(itnim, &im_port->itnim_mapped_list, list_entry) { 2558 sdev = scsi_device_lookup(im_port->shost, itnim->channel, 2559 itnim->scsi_tgt_id, 0); 2560 if (sdev) { 2561 if (lunmask_cfg == BFA_TRUE) 2562 sdev->sdev_bflags |= scan_flags; 2563 else 2564 sdev->sdev_bflags &= ~scan_flags; 2565 scsi_device_put(sdev); 2566 } 2567 } 2568 } 2569 -- 0-DAY CI Kernel Test Service https://01.org/lkp