drivers/scsi/mpt3sas/mpt3sas_base.c:4323:9: sparse: sparse: cast from restricted __le32

From: kernel test robot
Date: Tue Nov 07 2023 - 11:58:43 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: be3ca57cfb777ad820c6659d52e60bbdd36bf5ff
commit: d82e68483b81768c8d19bc7529635dad741607ce scsi: mpt3sas: Revert "scsi: mpt3sas: Fix ioc->base_readl() use"
date: 1 year, 1 month ago
config: riscv-randconfig-r121-20231107 (https://download.01.org/0day-ci/archive/20231108/202311080059.uscQqMAV-lkp@xxxxxxxxx/config)
compiler: riscv64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231108/202311080059.uscQqMAV-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311080059.uscQqMAV-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
WARNING: invalid argument to '-march': '_zicbom_zihintpause'
>> drivers/scsi/mpt3sas/mpt3sas_base.c:4323:9: sparse: sparse: cast from restricted __le32
drivers/scsi/mpt3sas/mpt3sas_base.c:4345:9: sparse: sparse: cast from restricted __le32
drivers/scsi/mpt3sas/mpt3sas_base.c:4368:9: sparse: sparse: cast from restricted __le32
drivers/scsi/mpt3sas/mpt3sas_base.c:4389:9: sparse: sparse: cast from restricted __le32
drivers/scsi/mpt3sas/mpt3sas_base.c:7066:17: sparse: sparse: cast from restricted __le32
drivers/scsi/mpt3sas/mpt3sas_base.c:7085:20: sparse: sparse: cast to restricted __le16
drivers/scsi/mpt3sas/mpt3sas_base.c:7093:20: sparse: sparse: cast to restricted __le16
drivers/scsi/mpt3sas/mpt3sas_base.c:7106:36: sparse: sparse: cast to restricted __le16

vim +4323 drivers/scsi/mpt3sas/mpt3sas_base.c

f92363d1235949 Sreekanth Reddy 2012-11-30 4302
79c74d03d527f8 Suganath Prabu S 2019-05-31 4303 /**
79c74d03d527f8 Suganath Prabu S 2019-05-31 4304 * _base_put_smid_scsi_io_atomic - send SCSI_IO request to firmware using
79c74d03d527f8 Suganath Prabu S 2019-05-31 4305 * Atomic Request Descriptor
79c74d03d527f8 Suganath Prabu S 2019-05-31 4306 * @ioc: per adapter object
79c74d03d527f8 Suganath Prabu S 2019-05-31 4307 * @smid: system request message index
79c74d03d527f8 Suganath Prabu S 2019-05-31 4308 * @handle: device handle, unused in this function, for function type match
79c74d03d527f8 Suganath Prabu S 2019-05-31 4309 *
2910a4a9e90a58 Randy Dunlap 2021-04-18 4310 * Return: nothing.
79c74d03d527f8 Suganath Prabu S 2019-05-31 4311 */
79c74d03d527f8 Suganath Prabu S 2019-05-31 4312 static void
79c74d03d527f8 Suganath Prabu S 2019-05-31 4313 _base_put_smid_scsi_io_atomic(struct MPT3SAS_ADAPTER *ioc, u16 smid,
79c74d03d527f8 Suganath Prabu S 2019-05-31 4314 u16 handle)
79c74d03d527f8 Suganath Prabu S 2019-05-31 4315 {
79c74d03d527f8 Suganath Prabu S 2019-05-31 4316 Mpi26AtomicRequestDescriptor_t descriptor;
79c74d03d527f8 Suganath Prabu S 2019-05-31 4317 u32 *request = (u32 *)&descriptor;
79c74d03d527f8 Suganath Prabu S 2019-05-31 4318
79c74d03d527f8 Suganath Prabu S 2019-05-31 4319 descriptor.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_SCSI_IO;
998c3001d31a27 Suganath Prabu S 2019-05-31 4320 descriptor.MSIxIndex = _base_set_and_get_msix_index(ioc, smid);
79c74d03d527f8 Suganath Prabu S 2019-05-31 4321 descriptor.SMID = cpu_to_le16(smid);
79c74d03d527f8 Suganath Prabu S 2019-05-31 4322
f920642e406cfa Damien Le Moal 2022-09-16 @4323 writel(cpu_to_le32(*request), &ioc->chip->AtomicRequestDescriptorPost);
79c74d03d527f8 Suganath Prabu S 2019-05-31 4324 }
79c74d03d527f8 Suganath Prabu S 2019-05-31 4325

:::::: The code at line 4323 was first introduced by commit
:::::: f920642e406cfa17ebecf03d5b83a02273ec718e scsi: mpt3sas: Revert "scsi: mpt3sas: Fix writel() use"

:::::: TO: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx>
:::::: CC: Martin K. Petersen <martin.petersen@xxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki