linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>
Cc: Michal Simek <monstr@monstr.eu>,
	kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org
Subject: [xlnx:xlnx_rebase_v5.4 19/1697] drivers/mtd/nand/raw/arasan_nand.c:365:16: warning: right shift count >= width of type
Date: Wed, 13 Jan 2021 01:37:26 +0800	[thread overview]
Message-ID: <202101130117.RpaB6QLn-lkp@intel.com> (raw)

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

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head:   629150468791671b5fde21363e643e87c5815b17
commit: 1dea215e98f470c4fabe230cb5dcb648e3301fb9 [19/1697] mtd: rawnand: Add support for ARASAN NAND controller
config: m68k-randconfig-r013-20210112 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/Xilinx/linux-xlnx/commit/1dea215e98f470c4fabe230cb5dcb648e3301fb9
        git remote add xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xlnx xlnx_rebase_v5.4
        git checkout 1dea215e98f470c4fabe230cb5dcb648e3301fb9
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

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

All warnings (new ones prefixed by >>):

   In file included from include/linux/err.h:5,
                    from include/linux/clk.h:12,
                    from drivers/mtd/nand/raw/arasan_nand.c:10:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   arch/m68k/include/asm/page_no.h:33:50: warning: ordered comparison of pointer with null pointer [-Wextra]
      33 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
         |                                                  ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |  ^~~~~~
   include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |          ^~~~~~~~~~~~~~~
   In file included from arch/m68k/include/asm/io.h:6,
                    from arch/m68k/include/asm/pgtable_no.h:14,
                    from arch/m68k/include/asm/pgtable.h:3,
                    from include/linux/mm.h:99,
                    from include/linux/scatterlist.h:8,
                    from include/linux/dma-mapping.h:11,
                    from drivers/mtd/nand/raw/arasan_nand.c:12:
   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);
         |                ^~
   arch/m68k/include/asm/io_no.h:25:77: note: in definition of macro '__raw_writel'
      25 | #define __raw_writel(b, addr) (void)((*(volatile unsigned int *) (addr)) = (b))
         |                                                                             ^
   drivers/mtd/nand/raw/arasan_nand.c:365:2: note: in expansion of macro 'writel'
     365 |  writel((paddr >> 32), nfc->base + DMA_ADDR1_OFST);
         |  ^~~~~~
   In file included from arch/m68k/include/asm/page.h:49,
                    from arch/m68k/include/asm/thread_info.h:6,
                    from include/linux/thread_info.h:38,
                    from arch/m68k/include/asm/current.h:16,
                    from include/linux/mutex.h:14,
                    from include/linux/notifier.h:14,
                    from include/linux/clk.h:14,
                    from drivers/mtd/nand/raw/arasan_nand.c:10:
   drivers/mtd/nand/raw/arasan_nand.c: In function 'anfc_read_data_op':
   arch/m68k/include/asm/page_no.h:33:50: warning: ordered comparison of pointer with null pointer [-Wextra]
      33 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
         |                                                  ^~
   drivers/mtd/nand/raw/arasan_nand.c:420:6: note: in expansion of macro 'virt_addr_valid'
     420 |  if (virt_addr_valid(buf))
         |      ^~~~~~~~~~~~~~~
   drivers/mtd/nand/raw/arasan_nand.c: In function 'anfc_write_data_op':
   arch/m68k/include/asm/page_no.h:33:50: warning: ordered comparison of pointer with null pointer [-Wextra]
      33 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
         |                                                  ^~
   drivers/mtd/nand/raw/arasan_nand.c:431:6: note: in expansion of macro 'virt_addr_valid'
     431 |  if (virt_addr_valid(buf))
         |      ^~~~~~~~~~~~~~~


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

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

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

                 reply	other threads:[~2021-01-12 17:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202101130117.RpaB6QLn-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=monstr@monstr.eu \
    --cc=naga.sureshkumar.relli@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).