lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202409101048.isDGxmBR-lkp@intel.com>
Date: Tue, 10 Sep 2024 10:25:58 +0800
From: kernel test robot <lkp@...el.com>
To: Avri Altman <avri.altman@....com>,
	"Martin K . Petersen" <martin.petersen@...cle.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org, Bart Van Assche <bvanassche@....org>,
	Avri Altman <avri.altman@....com>
Subject: Re: [PATCH] scsi: ufs: Use pre-calculated offsets in ufshcd_init_lrb

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@intel.com/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@intel.com/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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409101048.isDGxmBR-lkp@intel.com/

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ