[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202007172118.AK6gd8XR%lkp@intel.com>
Date: Fri, 17 Jul 2020 21:36:25 +0800
From: kernel test robot <lkp@...el.com>
To: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/xen/grant-table.c:747:17: sparse: sparse: incorrect type in
argument 1 (different address spaces)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8882572675c1bb1cc544f4e229a11661f1fc52e4
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 4 weeks ago
config: arm-randconfig-s031-20200717 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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.2-49-g707c5017-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
drivers/xen/grant-table.c:739:15: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *vaddr @@ got void [noderef] __iomem * @@
drivers/xen/grant-table.c:739:15: sparse: expected void *vaddr
drivers/xen/grant-table.c:739:15: sparse: got void [noderef] __iomem *
>> drivers/xen/grant-table.c:747:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *iomem_cookie @@ got void *vaddr @@
>> drivers/xen/grant-table.c:747:17: sparse: expected void volatile [noderef] __iomem *iomem_cookie
drivers/xen/grant-table.c:747:17: sparse: got void *vaddr
>> drivers/xen/grant-table.c:766:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *iomem_cookie @@ got void *[addressable] [assigned] [toplevel] vaddr @@
drivers/xen/grant-table.c:766:9: sparse: expected void volatile [noderef] __iomem *iomem_cookie
drivers/xen/grant-table.c:766:9: sparse: got void *[addressable] [assigned] [toplevel] vaddr
vim +747 drivers/xen/grant-table.c
ad9a86121f5a374 Jeremy Fitzhardinge 2007-07-17 728
47c542050d306e5 Julien Grall 2014-01-30 729 int gnttab_setup_auto_xlat_frames(phys_addr_t addr)
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 730 {
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 731 xen_pfn_t *pfn;
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 732 unsigned int max_nr_gframes = __max_nr_grant_frames();
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 733 unsigned int i;
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 734 void *vaddr;
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 735
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 736 if (xen_auto_xlat_grant_frames.count)
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 737 return -EINVAL;
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 738
5ed5451d997f7a8 Julien Grall 2015-05-05 739 vaddr = xen_remap(addr, XEN_PAGE_SIZE * max_nr_gframes);
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 740 if (vaddr == NULL) {
47c542050d306e5 Julien Grall 2014-01-30 741 pr_warn("Failed to ioremap gnttab share frames (addr=%pa)!\n",
47c542050d306e5 Julien Grall 2014-01-30 742 &addr);
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 743 return -ENOMEM;
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 744 }
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 745 pfn = kcalloc(max_nr_gframes, sizeof(pfn[0]), GFP_KERNEL);
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 746 if (!pfn) {
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 @747 xen_unmap(vaddr);
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 748 return -ENOMEM;
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 749 }
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 750 for (i = 0; i < max_nr_gframes; i++)
5ed5451d997f7a8 Julien Grall 2015-05-05 751 pfn[i] = XEN_PFN_DOWN(addr) + i;
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 752
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 753 xen_auto_xlat_grant_frames.vaddr = vaddr;
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 754 xen_auto_xlat_grant_frames.pfn = pfn;
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 755 xen_auto_xlat_grant_frames.count = max_nr_gframes;
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 756
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 757 return 0;
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 758 }
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 759 EXPORT_SYMBOL_GPL(gnttab_setup_auto_xlat_frames);
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 760
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 761 void gnttab_free_auto_xlat_frames(void)
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 762 {
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 763 if (!xen_auto_xlat_grant_frames.count)
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 764 return;
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 765 kfree(xen_auto_xlat_grant_frames.pfn);
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 @766 xen_unmap(xen_auto_xlat_grant_frames.vaddr);
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 767
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 768 xen_auto_xlat_grant_frames.pfn = NULL;
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 769 xen_auto_xlat_grant_frames.count = 0;
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 770 xen_auto_xlat_grant_frames.vaddr = NULL;
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 771 }
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 772 EXPORT_SYMBOL_GPL(gnttab_free_auto_xlat_frames);
efaf30a3357872c Konrad Rzeszutek Wilk 2014-01-06 773
:::::: The code at line 747 was first introduced by commit
:::::: efaf30a3357872cf0fc7d555b1f9968ec71535d3 xen/grant: Implement an grant frame array struct (v3).
:::::: TO: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
:::::: CC: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (35282 bytes)
Powered by blists - more mailing lists