linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Han Xu <han.xu@nxp.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Mark Brown <broonie@kernel.org>, Adam Ford <aford173@gmail.com>
Subject: drivers/spi/spi-nxp-fspi.c:672:34: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Wed, 27 May 2020 18:18:12 +0800	[thread overview]
Message-ID: <202005271809.7ArbGHWb%lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   444fc5cde64330661bf59944c43844e7d4c2ccd8
commit: d166a73503ef74fb761f1a3103ef7919928d7b52 spi: fspi: dynamically alloc AHB memory
date:   3 months ago
config: openrisc-randconfig-s031-20200527 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-240-gf0fe1cd9-dirty
        git checkout d166a73503ef74fb761f1a3103ef7919928d7b52
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=openrisc CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

   drivers/spi/spi-nxp-fspi.c:472:25: sparse: sparse: cast from restricted __be32
>> drivers/spi/spi-nxp-fspi.c:672:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] <asn:2> *ahb_addr @@
   drivers/spi/spi-nxp-fspi.c:672:34: sparse:     expected void *addr
   drivers/spi/spi-nxp-fspi.c:672:34: sparse:     got void [noderef] <asn:2> *ahb_addr
   drivers/spi/spi-nxp-fspi.c:1102:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] <asn:2> *ahb_addr @@
   drivers/spi/spi-nxp-fspi.c:1102:26: sparse:     expected void *addr
   drivers/spi/spi-nxp-fspi.c:1102:26: sparse:     got void [noderef] <asn:2> *ahb_addr
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32

vim +672 drivers/spi/spi-nxp-fspi.c

   662	
   663	static int nxp_fspi_read_ahb(struct nxp_fspi *f, const struct spi_mem_op *op)
   664	{
   665		u32 start = op->addr.val;
   666		u32 len = op->data.nbytes;
   667	
   668		/* if necessary, ioremap before AHB read */
   669		if ((!f->ahb_addr) || start < f->memmap_start ||
   670		     start + len > f->memmap_start + f->memmap_len) {
   671			if (f->ahb_addr)
 > 672				iounmap(f->ahb_addr);
   673	
   674			f->memmap_start = start;
   675			f->memmap_len = len > NXP_FSPI_MIN_IOMAP ?
   676					len : NXP_FSPI_MIN_IOMAP;
   677	
   678			f->ahb_addr = ioremap_wc(f->memmap_phy + f->memmap_start,
   679						 f->memmap_len);
   680	
   681			if (!f->ahb_addr) {
   682				dev_err(f->dev, "failed to alloc memory\n");
   683				return -ENOMEM;
   684			}
   685		}
   686	
   687		/* Read out the data directly from the AHB buffer. */
   688		memcpy_fromio(op->data.buf.in,
   689			      f->ahb_addr + start - f->memmap_start, len);
   690	
   691		return 0;
   692	}
   693	

---
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: 31047 bytes --]

                 reply	other threads:[~2020-05-27 10:19 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=202005271809.7ArbGHWb%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=aford173@gmail.com \
    --cc=broonie@kernel.org \
    --cc=han.xu@nxp.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).