mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Peng Fan <peng.fan@nxp.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>
Subject: drivers/remoteproc/remoteproc_coredump.c:169:53: sparse: sparse: incorrect type in argument 2 (different address spaces)
Date: Wed, 10 Nov 2021 06:45:19 +0800	[thread overview]
Message-ID: <202111100611.QZr8xYrT-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cb690f5238d71f543f4ce874aa59237cf53a877c
commit: 40df0a91b2a5228ded8e5f75b80d28c96c6831cd remoteproc: add is_iomem to da_to_va
date:   8 months ago
config: m68k-randconfig-s031-20211109 (attached as .config)
compiler: m68k-linux-gcc (GCC) 11.2.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.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=40df0a91b2a5228ded8e5f75b80d28c96c6831cd
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 40df0a91b2a5228ded8e5f75b80d28c96c6831cd
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=m68k 

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/remoteproc/remoteproc_coredump.c:169:53: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const volatile [noderef] __iomem *src @@     got void *[assigned] ptr @@
   drivers/remoteproc/remoteproc_coredump.c:169:53: sparse:     expected void const volatile [noderef] __iomem *src
   drivers/remoteproc/remoteproc_coredump.c:169:53: sparse:     got void *[assigned] ptr

vim +169 drivers/remoteproc/remoteproc_coredump.c

   150	
   151	static void rproc_copy_segment(struct rproc *rproc, void *dest,
   152				       struct rproc_dump_segment *segment,
   153				       size_t offset, size_t size)
   154	{
   155		void *ptr;
   156		bool is_iomem;
   157	
   158		if (segment->dump) {
   159			segment->dump(rproc, segment, dest, offset, size);
   160		} else {
   161			ptr = rproc_da_to_va(rproc, segment->da + offset, size, &is_iomem);
   162			if (!ptr) {
   163				dev_err(&rproc->dev,
   164					"invalid copy request for segment %pad with offset %zu and size %zu)\n",
   165					&segment->da, offset, size);
   166				memset(dest, 0xff, size);
   167			} else {
   168				if (is_iomem)
 > 169					memcpy_fromio(dest, ptr, size);
   170				else
   171					memcpy(dest, ptr, size);
   172			}
   173		}
   174	}
   175	

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

                 reply	other threads:[~2021-11-09 22:50 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=202111100611.QZr8xYrT-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=peng.fan@nxp.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

all inboxes | Powered by JetHome®