Re: [PATCH net-next 02/10] crypto: octeontx2: add SGv2 support for CN10KB or CN10KA B0

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

 



Hi Srujana,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Srujana-Challa/crypto-octeontx2-remove-CPT-block-reset/20231124-210255
base:   net-next/main
patch link:    https://lore.kernel.org/r/20231124125047.2329693-3-schalla%40marvell.com
patch subject: [PATCH net-next 02/10] crypto: octeontx2: add SGv2 support for CN10KB or CN10KA B0
config: sparc-randconfig-r113-20231127 (https://download.01.org/0day-ci/archive/20231127/202311271719.io1crN0R-lkp@xxxxxxxxx/config)
compiler: sparc64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231127/202311271719.io1crN0R-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/202311271719.io1crN0R-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
   drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c: note: in included file (through drivers/crypto/marvell/octeontx2/otx2_cptlf.h, drivers/crypto/marvell/octeontx2/otx2_cptvf.h):
>> drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:301:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] len0 @@     got unsigned short [usertype] size @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:301:30: sparse:     expected restricted __be16 [usertype] len0
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:301:30: sparse:     got unsigned short [usertype] size
>> drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:302:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] len1 @@     got unsigned short [usertype] size @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:302:30: sparse:     expected restricted __be16 [usertype] len1
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:302:30: sparse:     got unsigned short [usertype] size
>> drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:303:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] len2 @@     got unsigned short [usertype] size @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:303:30: sparse:     expected restricted __be16 [usertype] len2
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:303:30: sparse:     got unsigned short [usertype] size
>> drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:304:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be64 [usertype] ptr0 @@     got unsigned long long [usertype] dma_addr @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:304:30: sparse:     expected restricted __be64 [usertype] ptr0
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:304:30: sparse:     got unsigned long long [usertype] dma_addr
>> drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:305:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be64 [usertype] ptr1 @@     got unsigned long long [usertype] dma_addr @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:305:30: sparse:     expected restricted __be64 [usertype] ptr1
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:305:30: sparse:     got unsigned long long [usertype] dma_addr
>> drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:306:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be64 [usertype] ptr2 @@     got unsigned long long [usertype] dma_addr @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:306:30: sparse:     expected restricted __be64 [usertype] ptr2
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:306:30: sparse:     got unsigned long long [usertype] dma_addr
>> drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:307:36: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] valid_segs @@     got int @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:307:36: sparse:     expected restricted __be16 [usertype] valid_segs
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:307:36: sparse:     got int
>> drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:312:28: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] valid_segs @@     got int [assigned] components @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:312:28: sparse:     expected restricted __be16 [usertype] valid_segs
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:312:28: sparse:     got int [assigned] components
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:315:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] len1 @@     got unsigned short [usertype] size @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:315:30: sparse:     expected restricted __be16 [usertype] len1
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:315:30: sparse:     got unsigned short [usertype] size
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:316:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be64 [usertype] ptr1 @@     got unsigned long long [usertype] dma_addr @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:316:30: sparse:     expected restricted __be64 [usertype] ptr1
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:316:30: sparse:     got unsigned long long [usertype] dma_addr
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:319:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] len0 @@     got unsigned short [usertype] size @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:319:30: sparse:     expected restricted __be16 [usertype] len0
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:319:30: sparse:     got unsigned short [usertype] size
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:320:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be64 [usertype] ptr0 @@     got unsigned long long [usertype] dma_addr @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:320:30: sparse:     expected restricted __be64 [usertype] ptr0
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:320:30: sparse:     got unsigned long long [usertype] dma_addr
>> drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:301:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] len0 @@     got unsigned short [usertype] size @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:301:30: sparse:     expected restricted __be16 [usertype] len0
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:301:30: sparse:     got unsigned short [usertype] size
>> drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:302:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] len1 @@     got unsigned short [usertype] size @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:302:30: sparse:     expected restricted __be16 [usertype] len1
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:302:30: sparse:     got unsigned short [usertype] size
>> drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:303:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] len2 @@     got unsigned short [usertype] size @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:303:30: sparse:     expected restricted __be16 [usertype] len2
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:303:30: sparse:     got unsigned short [usertype] size
>> drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:304:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be64 [usertype] ptr0 @@     got unsigned long long [usertype] dma_addr @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:304:30: sparse:     expected restricted __be64 [usertype] ptr0
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:304:30: sparse:     got unsigned long long [usertype] dma_addr
>> drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:305:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be64 [usertype] ptr1 @@     got unsigned long long [usertype] dma_addr @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:305:30: sparse:     expected restricted __be64 [usertype] ptr1
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:305:30: sparse:     got unsigned long long [usertype] dma_addr
>> drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:306:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be64 [usertype] ptr2 @@     got unsigned long long [usertype] dma_addr @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:306:30: sparse:     expected restricted __be64 [usertype] ptr2
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:306:30: sparse:     got unsigned long long [usertype] dma_addr
>> drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:307:36: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] valid_segs @@     got int @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:307:36: sparse:     expected restricted __be16 [usertype] valid_segs
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:307:36: sparse:     got int
>> drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:312:28: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] valid_segs @@     got int [assigned] components @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:312:28: sparse:     expected restricted __be16 [usertype] valid_segs
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:312:28: sparse:     got int [assigned] components
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:315:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] len1 @@     got unsigned short [usertype] size @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:315:30: sparse:     expected restricted __be16 [usertype] len1
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:315:30: sparse:     got unsigned short [usertype] size
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:316:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be64 [usertype] ptr1 @@     got unsigned long long [usertype] dma_addr @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:316:30: sparse:     expected restricted __be64 [usertype] ptr1
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:316:30: sparse:     got unsigned long long [usertype] dma_addr
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:319:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] len0 @@     got unsigned short [usertype] size @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:319:30: sparse:     expected restricted __be16 [usertype] len0
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:319:30: sparse:     got unsigned short [usertype] size
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:320:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be64 [usertype] ptr0 @@     got unsigned long long [usertype] dma_addr @@
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:320:30: sparse:     expected restricted __be64 [usertype] ptr0
   drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h:320:30: sparse:     got unsigned long long [usertype] dma_addr

vim +301 drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h

   272	
   273	static inline int sgv2io_components_setup(struct pci_dev *pdev,
   274						  struct otx2_cpt_buf_ptr *list,
   275						  int buf_count, u8 *buffer)
   276	{
   277		struct cn10kb_cpt_sglist_component *sg_ptr = NULL;
   278		int ret = 0, i, j;
   279		int components;
   280	
   281		if (unlikely(!list)) {
   282			dev_err(&pdev->dev, "Input list pointer is NULL\n");
   283			return -EFAULT;
   284		}
   285	
   286		for (i = 0; i < buf_count; i++) {
   287			if (unlikely(!list[i].vptr))
   288				continue;
   289			list[i].dma_addr = dma_map_single(&pdev->dev, list[i].vptr,
   290							  list[i].size,
   291							  DMA_BIDIRECTIONAL);
   292			if (unlikely(dma_mapping_error(&pdev->dev, list[i].dma_addr))) {
   293				dev_err(&pdev->dev, "Dma mapping failed\n");
   294				ret = -EIO;
   295				goto sg_cleanup;
   296			}
   297		}
   298		components = buf_count / 3;
   299		sg_ptr = (struct cn10kb_cpt_sglist_component *)buffer;
   300		for (i = 0; i < components; i++) {
 > 301			sg_ptr->len0 = list[i * 3 + 0].size;
 > 302			sg_ptr->len1 = list[i * 3 + 1].size;
 > 303			sg_ptr->len2 = list[i * 3 + 2].size;
 > 304			sg_ptr->ptr0 = list[i * 3 + 0].dma_addr;
 > 305			sg_ptr->ptr1 = list[i * 3 + 1].dma_addr;
 > 306			sg_ptr->ptr2 = list[i * 3 + 2].dma_addr;
 > 307			sg_ptr->valid_segs = 3;
   308			sg_ptr++;
   309		}
   310		components = buf_count % 3;
   311	
 > 312		sg_ptr->valid_segs = components;
   313		switch (components) {
   314		case 2:
   315			sg_ptr->len1 = list[i * 3 + 1].size;
   316			sg_ptr->ptr1 = list[i * 3 + 1].dma_addr;
   317			fallthrough;
   318		case 1:
   319			sg_ptr->len0 = list[i * 3 + 0].size;
   320			sg_ptr->ptr0 = list[i * 3 + 0].dma_addr;
   321			break;
   322		default:
   323			break;
   324		}
   325		return ret;
   326	
   327	sg_cleanup:
   328		for (j = 0; j < i; j++) {
   329			if (list[j].dma_addr) {
   330				dma_unmap_single(&pdev->dev, list[j].dma_addr,
   331						 list[j].size, DMA_BIDIRECTIONAL);
   332			}
   333	
   334			list[j].dma_addr = 0;
   335		}
   336		return ret;
   337	}
   338	

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




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux