Re: [PATCH V10 04/10] remoteproc: add is_iomem to da_to_va

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v5.11-rc6 next-20210125]
[cannot apply to remoteproc/for-next rpmsg/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/peng-fan-oss-nxp-com/remoteproc-imx_rproc-support-iMX8MQ-M/20210209-081535
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: x86_64-randconfig-s032-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-215-g0fb77bb6-dirty
        # https://github.com/0day-ci/linux/commit/d6d510f24530c76a045a1a3fbc56ac411fd53809
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review peng-fan-oss-nxp-com/remoteproc-imx_rproc-support-iMX8MQ-M/20210209-081535
        git checkout d6d510f24530c76a045a1a3fbc56ac411fd53809
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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


"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 * @@     got void *[assigned] ptr @@
   drivers/remoteproc/remoteproc_coredump.c:169:53: sparse:     expected void const volatile [noderef] __iomem *
   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@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux