[xilinx-xlnx:xlnx_rebase_v5.4 19/1767] drivers/mtd/nand/raw/arasan_nand.c:365:16: warning: right shift count >= width of type

kernel test robot lkp at intel.com
Tue Oct 5 07:07:06 PDT 2021


tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head:   1ad9b65f0dbe2b3ecc22a498e75a48d8ee39bbda
commit: 1dea215e98f470c4fabe230cb5dcb648e3301fb9 [19/1767] mtd: rawnand: Add support for ARASAN NAND controller
config: i386-randconfig-a005-20211004 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/Xilinx/linux-xlnx/commit/1dea215e98f470c4fabe230cb5dcb648e3301fb9
        git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.4
        git checkout 1dea215e98f470c4fabe230cb5dcb648e3301fb9
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

All warnings (new ones prefixed by >>):

   drivers/mtd/nand/raw/arasan_nand.c: In function 'anfc_rw_dma_op':
>> drivers/mtd/nand/raw/arasan_nand.c:365:16: warning: right shift count >= width of type [-Wshift-count-overflow]
     365 |  writel((paddr >> 32), nfc->base + DMA_ADDR1_OFST);
         |                ^~


vim +365 drivers/mtd/nand/raw/arasan_nand.c

   337	
   338	static void anfc_rw_dma_op(struct mtd_info *mtd, u8 *buf, int len,
   339				   bool do_read, u32 prog, int pktcount, int pktsize)
   340	{
   341		dma_addr_t paddr;
   342		struct nand_chip *chip = mtd_to_nand(mtd);
   343		struct anfc_nand_controller *nfc = to_anfc(chip->controller);
   344		struct anfc_nand_chip *achip = to_anfc_nand(chip);
   345		u32 eccintr = 0, dir;
   346	
   347		if (pktsize == 0)
   348			pktsize = len;
   349	
   350		anfc_setpktszcnt(nfc, pktsize, pktcount);
   351	
   352		if (!achip->strength)
   353			eccintr = MBIT_ERROR;
   354	
   355		if (do_read)
   356			dir = DMA_FROM_DEVICE;
   357		else
   358			dir = DMA_TO_DEVICE;
   359		paddr = dma_map_single(nfc->dev, buf, len, dir);
   360		if (dma_mapping_error(nfc->dev, paddr)) {
   361			dev_err(nfc->dev, "Read buffer mapping error");
   362			return;
   363		}
   364		writel(paddr, nfc->base + DMA_ADDR0_OFST);
 > 365		writel((paddr >> 32), nfc->base + DMA_ADDR1_OFST);
   366		anfc_enable_intrs(nfc, (XFER_COMPLETE | eccintr));
   367		writel(prog, nfc->base + PROG_OFST);
   368		anfc_wait_for_event(nfc);
   369		dma_unmap_single(nfc->dev, paddr, len, dir);
   370	}
   371	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 30124 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20211005/65aa562f/attachment-0001.gz>


More information about the linux-arm-kernel mailing list