Re: [PATCH] scsi: ufs: Use pre-calculated offsets in ufshcd_init_lrb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Avri,

kernel test robot noticed the following build warnings:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on jejb-scsi/for-next linus/master v6.11-rc7 next-20240909]
[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/Avri-Altman/scsi-ufs-Use-pre-calculated-offsets-in-ufshcd_init_lrb/20240909-180037
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
patch link:    https://lore.kernel.org/r/20240909095646.3756308-1-avri.altman%40wdc.com
patch subject: [PATCH] scsi: ufs: Use pre-calculated offsets in ufshcd_init_lrb
config: x86_64-randconfig-121-20240910 (https://download.01.org/0day-ci/archive/20240910/202409101048.isDGxmBR-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240910/202409101048.isDGxmBR-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/202409101048.isDGxmBR-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> drivers/ufs/core/ufshcd.c:2922:40: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned short [usertype] response_offset @@     got restricted __le16 [usertype] response_upiu_offset @@
   drivers/ufs/core/ufshcd.c:2922:40: sparse:     expected unsigned short [usertype] response_offset
   drivers/ufs/core/ufshcd.c:2922:40: sparse:     got restricted __le16 [usertype] response_upiu_offset
>> drivers/ufs/core/ufshcd.c:2923:36: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned short [usertype] prdt_offset @@     got restricted __le16 [usertype] prd_table_offset @@
   drivers/ufs/core/ufshcd.c:2923:36: sparse:     expected unsigned short [usertype] prdt_offset
   drivers/ufs/core/ufshcd.c:2923:36: sparse:     got restricted __le16 [usertype] prd_table_offset

vim +2922 drivers/ufs/core/ufshcd.c

  2914	
  2915	static void ufshcd_init_lrb(struct ufs_hba *hba, struct ufshcd_lrb *lrb, int i)
  2916	{
  2917		struct utp_transfer_cmd_desc *cmd_descp = (void *)hba->ucdl_base_addr +
  2918			i * ufshcd_get_ucd_size(hba);
  2919		struct utp_transfer_req_desc *utrdlp = hba->utrdl_base_addr;
  2920		dma_addr_t cmd_desc_element_addr = hba->ucdl_dma_addr +
  2921			i * ufshcd_get_ucd_size(hba);
> 2922		u16 response_offset = utrdlp[i].response_upiu_offset;
> 2923		u16 prdt_offset = utrdlp[i].prd_table_offset;
  2924	
  2925		lrb->utr_descriptor_ptr = utrdlp + i;
  2926		lrb->utrd_dma_addr = hba->utrdl_dma_addr +
  2927			i * sizeof(struct utp_transfer_req_desc);
  2928		lrb->ucd_req_ptr = (struct utp_upiu_req *)cmd_descp->command_upiu;
  2929		lrb->ucd_req_dma_addr = cmd_desc_element_addr;
  2930		lrb->ucd_rsp_ptr = (struct utp_upiu_rsp *)cmd_descp->response_upiu;
  2931		lrb->ucd_rsp_dma_addr = cmd_desc_element_addr + response_offset;
  2932		lrb->ucd_prdt_ptr = (struct ufshcd_sg_entry *)cmd_descp->prd_table;
  2933		lrb->ucd_prdt_dma_addr = cmd_desc_element_addr + prdt_offset;
  2934	}
  2935	

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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux