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

kernel test robot lkp at intel.com
Tue Dec 14 13:31:51 PST 2021


Hi Naga,

FYI, the error/warning still remains.

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head:   abafefebd1f1e040eef74e4ab571ea08bf745641
commit: 1dea215e98f470c4fabe230cb5dcb648e3301fb9 [19/1768] mtd: rawnand: Add support for ARASAN NAND controller
config: i386-randconfig-r006-20211214 (https://download.01.org/0day-ci/archive/20211215/202112150521.VqbVocvt-lkp@intel.com/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 config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/mtd/nand/raw/ drivers/usb/dwc3/

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



More information about the linux-arm-kernel mailing list