All of lore.kernel.org
 help / color / mirror / Atom feed
* [intel-linux-intel-lts:5.4/yocto 15/1142] drivers/crypto/keembay/keembay-ocs-hcu-core.c:226:53: sparse: sparse: shift too big (32) for type unsigned long
@ 2021-06-30 20:04 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-06-30 20:04 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3944 bytes --]

CC: kbuild-all(a)lists.01.org
TO: Declan Murphy <declan.murphy@intel.com>
CC: "Li, Yifan" <yifan2.li@intel.com>

tree:   https://github.com/intel/linux-intel-lts.git 5.4/yocto
head:   eeb611e5394c56d45c5cc8f7dc484c9f19e93143
commit: 9b07a958f2eb496c88faf0bd749eb600357f4190 [15/1142] crypto: keembay: Add Keem Bay OCS HCU
:::::: branch date: 11 months ago
:::::: commit date: 11 months ago
config: arm-randconfig-s031-20210630 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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.3-341-g8af24329-dirty
        # https://github.com/intel/linux-intel-lts/commit/9b07a958f2eb496c88faf0bd749eb600357f4190
        git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
        git fetch --no-tags intel-linux-intel-lts 5.4/yocto
        git checkout 9b07a958f2eb496c88faf0bd749eb600357f4190
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash drivers/crypto/keembay/ drivers/gpu/drm/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
   drivers/crypto/keembay/keembay-ocs-hcu-core.c:218:31: sparse: sparse: Using plain integer as NULL pointer
   drivers/crypto/keembay/keembay-ocs-hcu-core.c:219:31: sparse: sparse: Using plain integer as NULL pointer
   drivers/crypto/keembay/keembay-ocs-hcu-core.c:749:31: sparse: sparse: Using plain integer as NULL pointer
   drivers/crypto/keembay/keembay-ocs-hcu-core.c:750:31: sparse: sparse: Using plain integer as NULL pointer
>> drivers/crypto/keembay/keembay-ocs-hcu-core.c:226:53: sparse: sparse: shift too big (32) for type unsigned long
--
>> drivers/crypto/keembay/ocs-hcu.c:389:29: sparse: sparse: shift too big (32) for type unsigned long

vim +226 drivers/crypto/keembay/keembay-ocs-hcu-core.c

9b07a958f2eb49 Declan Murphy 2020-05-26  222  
9b07a958f2eb49 Declan Murphy 2020-05-26  223  static int kmb_ocs_add_dma_tail(struct ocs_hcu_rctx *rctx,
9b07a958f2eb49 Declan Murphy 2020-05-26  224  				dma_addr_t addr, size_t len)
9b07a958f2eb49 Declan Murphy 2020-05-26  225  {
9b07a958f2eb49 Declan Murphy 2020-05-26 @226  	if (addr & KMB_OCS_HCU_ALIGN_MASK || addr > OCS_HCU_DMA_MAX_ADDR_MASK)
9b07a958f2eb49 Declan Murphy 2020-05-26  227  		return -EINVAL;
9b07a958f2eb49 Declan Murphy 2020-05-26  228  
9b07a958f2eb49 Declan Murphy 2020-05-26  229  	if (!len)
9b07a958f2eb49 Declan Murphy 2020-05-26  230  		return 0;
9b07a958f2eb49 Declan Murphy 2020-05-26  231  
9b07a958f2eb49 Declan Murphy 2020-05-26  232  	rctx->dma_list_tail->src_adr = (u32)addr;
9b07a958f2eb49 Declan Murphy 2020-05-26  233  	rctx->dma_list_tail->src_len = (u32)len;
9b07a958f2eb49 Declan Murphy 2020-05-26  234  	rctx->dma_list_tail->ll_flags = 0;
9b07a958f2eb49 Declan Murphy 2020-05-26  235  	rctx->dma_list_tail->nxt_desc = rctx->ll_dma_addr +
9b07a958f2eb49 Declan Murphy 2020-05-26  236  					(virt_to_phys(rctx->dma_list_tail) -
9b07a958f2eb49 Declan Murphy 2020-05-26  237  					virt_to_phys(rctx->dma_list_head)) +
9b07a958f2eb49 Declan Murphy 2020-05-26  238  					sizeof(*rctx->dma_list_tail);
9b07a958f2eb49 Declan Murphy 2020-05-26  239  
9b07a958f2eb49 Declan Murphy 2020-05-26  240  	rctx->dma_list_tail++;
9b07a958f2eb49 Declan Murphy 2020-05-26  241  
9b07a958f2eb49 Declan Murphy 2020-05-26  242  	return 0;
9b07a958f2eb49 Declan Murphy 2020-05-26  243  }
9b07a958f2eb49 Declan Murphy 2020-05-26  244  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31633 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [intel-linux-intel-lts:5.4/yocto 15/1142] drivers/crypto/keembay/keembay-ocs-hcu-core.c:226:53: sparse: sparse: shift too big (32) for type unsigned long
@ 2021-04-12 13:44 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-04-12 13:44 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5108 bytes --]

CC: kbuild-all(a)lists.01.org
TO: Declan Murphy <declan.murphy@intel.com>
CC: "Li, Yifan" <yifan2.li@intel.com>

tree:   https://github.com/intel/linux-intel-lts.git 5.4/yocto
head:   eeb611e5394c56d45c5cc8f7dc484c9f19e93143
commit: 9b07a958f2eb496c88faf0bd749eb600357f4190 [15/1142] crypto: keembay: Add Keem Bay OCS HCU
:::::: branch date: 8 months ago
:::::: commit date: 8 months ago
config: i386-randconfig-s001-20210412 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-280-g2cd6d34e-dirty
        # https://github.com/intel/linux-intel-lts/commit/9b07a958f2eb496c88faf0bd749eb600357f4190
        git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
        git fetch --no-tags intel-linux-intel-lts 5.4/yocto
        git checkout 9b07a958f2eb496c88faf0bd749eb600357f4190
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
   drivers/crypto/keembay/keembay-ocs-hcu-core.c:218:31: sparse: sparse: Using plain integer as NULL pointer
   drivers/crypto/keembay/keembay-ocs-hcu-core.c:219:31: sparse: sparse: Using plain integer as NULL pointer
   drivers/crypto/keembay/keembay-ocs-hcu-core.c:749:31: sparse: sparse: Using plain integer as NULL pointer
   drivers/crypto/keembay/keembay-ocs-hcu-core.c:750:31: sparse: sparse: Using plain integer as NULL pointer
>> drivers/crypto/keembay/keembay-ocs-hcu-core.c:226:53: sparse: sparse: shift too big (32) for type unsigned long
--
>> drivers/crypto/keembay/ocs-hcu.c:389:29: sparse: sparse: shift too big (32) for type unsigned long

vim +226 drivers/crypto/keembay/keembay-ocs-hcu-core.c

9b07a958f2eb49 Declan Murphy 2020-05-26  202  
9b07a958f2eb49 Declan Murphy 2020-05-26  203  static void kmb_ocs_free_dma_list(struct ocs_hcu_rctx *rctx)
9b07a958f2eb49 Declan Murphy 2020-05-26  204  {
9b07a958f2eb49 Declan Murphy 2020-05-26  205  	struct ocs_hcu_dev *hcu_dev = rctx->hcu_dev;
9b07a958f2eb49 Declan Murphy 2020-05-26  206  	struct device *dev = hcu_dev->dev;
9b07a958f2eb49 Declan Murphy 2020-05-26  207  
9b07a958f2eb49 Declan Murphy 2020-05-26  208  	if (!rctx->dma_list_head || !rctx->dma_list_tail)
9b07a958f2eb49 Declan Murphy 2020-05-26  209  		return;
9b07a958f2eb49 Declan Murphy 2020-05-26  210  
9b07a958f2eb49 Declan Murphy 2020-05-26  211  	if (rctx->sg_dma_nents > 0)
9b07a958f2eb49 Declan Murphy 2020-05-26  212  		dma_unmap_sg(dev, hcu_dev->req->src, rctx->sg_dma_nents,
9b07a958f2eb49 Declan Murphy 2020-05-26  213  			     DMA_TO_DEVICE);
9b07a958f2eb49 Declan Murphy 2020-05-26  214  
9b07a958f2eb49 Declan Murphy 2020-05-26  215  	dma_free_coherent(dev, rctx->dma_list_size, rctx->dma_list_head,
9b07a958f2eb49 Declan Murphy 2020-05-26  216  			  rctx->ll_dma_addr);
9b07a958f2eb49 Declan Murphy 2020-05-26  217  
9b07a958f2eb49 Declan Murphy 2020-05-26 @218  	rctx->dma_list_head = 0;
9b07a958f2eb49 Declan Murphy 2020-05-26  219  	rctx->dma_list_tail = 0;
9b07a958f2eb49 Declan Murphy 2020-05-26  220  	rctx->ll_dma_addr = 0;
9b07a958f2eb49 Declan Murphy 2020-05-26  221  }
9b07a958f2eb49 Declan Murphy 2020-05-26  222  
9b07a958f2eb49 Declan Murphy 2020-05-26  223  static int kmb_ocs_add_dma_tail(struct ocs_hcu_rctx *rctx,
9b07a958f2eb49 Declan Murphy 2020-05-26  224  				dma_addr_t addr, size_t len)
9b07a958f2eb49 Declan Murphy 2020-05-26  225  {
9b07a958f2eb49 Declan Murphy 2020-05-26 @226  	if (addr & KMB_OCS_HCU_ALIGN_MASK || addr > OCS_HCU_DMA_MAX_ADDR_MASK)
9b07a958f2eb49 Declan Murphy 2020-05-26  227  		return -EINVAL;
9b07a958f2eb49 Declan Murphy 2020-05-26  228  
9b07a958f2eb49 Declan Murphy 2020-05-26  229  	if (!len)
9b07a958f2eb49 Declan Murphy 2020-05-26  230  		return 0;
9b07a958f2eb49 Declan Murphy 2020-05-26  231  
9b07a958f2eb49 Declan Murphy 2020-05-26  232  	rctx->dma_list_tail->src_adr = (u32)addr;
9b07a958f2eb49 Declan Murphy 2020-05-26  233  	rctx->dma_list_tail->src_len = (u32)len;
9b07a958f2eb49 Declan Murphy 2020-05-26  234  	rctx->dma_list_tail->ll_flags = 0;
9b07a958f2eb49 Declan Murphy 2020-05-26  235  	rctx->dma_list_tail->nxt_desc = rctx->ll_dma_addr +
9b07a958f2eb49 Declan Murphy 2020-05-26  236  					(virt_to_phys(rctx->dma_list_tail) -
9b07a958f2eb49 Declan Murphy 2020-05-26  237  					virt_to_phys(rctx->dma_list_head)) +
9b07a958f2eb49 Declan Murphy 2020-05-26  238  					sizeof(*rctx->dma_list_tail);
9b07a958f2eb49 Declan Murphy 2020-05-26  239  
9b07a958f2eb49 Declan Murphy 2020-05-26  240  	rctx->dma_list_tail++;
9b07a958f2eb49 Declan Murphy 2020-05-26  241  
9b07a958f2eb49 Declan Murphy 2020-05-26  242  	return 0;
9b07a958f2eb49 Declan Murphy 2020-05-26  243  }
9b07a958f2eb49 Declan Murphy 2020-05-26  244  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33388 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-30 20:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-30 20:04 [intel-linux-intel-lts:5.4/yocto 15/1142] drivers/crypto/keembay/keembay-ocs-hcu-core.c:226:53: sparse: sparse: shift too big (32) for type unsigned long kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-04-12 13:44 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.