oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* drivers/acpi/osl.c:723:27: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2023-07-22 19:45 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-07-22 19:45 UTC (permalink / raw)
  To: Sunil V L
  Cc: oe-kbuild-all, linux-kernel, Palmer Dabbelt, Andrew Jones, Conor Dooley

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   295e1388de2d5c0c354adbd65d0319c5d636c222
commit: a91a9ffbd3a55a0ae1bb75e2b6e85b2a03f64e8f RISC-V: Add support to build the ACPI core
date:   7 weeks ago
config: riscv-randconfig-r073-20230723 (https://download.01.org/0day-ci/archive/20230723/202307230357.egcTAefj-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230723/202307230357.egcTAefj-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307230357.egcTAefj-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   WARNING: invalid argument to '-march': '_zihintpause'
   drivers/acpi/osl.c:296:39: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected void [noderef] __iomem * @@     got void * @@
   drivers/acpi/osl.c:296:39: sparse:     expected void [noderef] __iomem *
   drivers/acpi/osl.c:296:39: sparse:     got void *
   drivers/acpi/osl.c:378:17: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/acpi/osl.c:723:27: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __iomem *[assigned] virt_addr @@     got void * @@
   drivers/acpi/osl.c:723:27: sparse:     expected void [noderef] __iomem *[assigned] virt_addr
   drivers/acpi/osl.c:723:27: sparse:     got void *
   drivers/acpi/osl.c:754:27: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __iomem *[assigned] virt_addr @@     got void * @@
   drivers/acpi/osl.c:754:27: sparse:     expected void [noderef] __iomem *[assigned] virt_addr
   drivers/acpi/osl.c:754:27: sparse:     got void *
   drivers/acpi/osl.c:1661:20: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void *rv @@     got void [noderef] __iomem * @@
   drivers/acpi/osl.c:1661:20: sparse:     expected void *rv
   drivers/acpi/osl.c:1661:20: sparse:     got void [noderef] __iomem *
   drivers/acpi/osl.c:711:1: sparse: sparse: context imbalance in 'acpi_os_read_memory' - wrong count at exit
   drivers/acpi/osl.c:744:1: sparse: sparse: context imbalance in 'acpi_os_write_memory' - wrong count at exit

vim +723 drivers/acpi/osl.c

eeb2d80d502af2 Srinivas Pandruvada 2017-10-05  709  
e615bf5b551986 Myron Stowe         2012-01-20  710  acpi_status
653f4b538f66d3 Bob Moore           2012-02-14  711  acpi_os_read_memory(acpi_physical_address phys_addr, u64 *value, u32 width)
e615bf5b551986 Myron Stowe         2012-01-20  712  {
e615bf5b551986 Myron Stowe         2012-01-20  713  	void __iomem *virt_addr;
e615bf5b551986 Myron Stowe         2012-01-20  714  	unsigned int size = width / 8;
e615bf5b551986 Myron Stowe         2012-01-20  715  	bool unmap = false;
e615bf5b551986 Myron Stowe         2012-01-20  716  	u64 dummy;
eeb2d80d502af2 Srinivas Pandruvada 2017-10-05  717  	int error;
e615bf5b551986 Myron Stowe         2012-01-20  718  
e615bf5b551986 Myron Stowe         2012-01-20  719  	rcu_read_lock();
e615bf5b551986 Myron Stowe         2012-01-20  720  	virt_addr = acpi_map_vaddr_lookup(phys_addr, size);
e615bf5b551986 Myron Stowe         2012-01-20  721  	if (!virt_addr) {
e615bf5b551986 Myron Stowe         2012-01-20  722  		rcu_read_unlock();
e615bf5b551986 Myron Stowe         2012-01-20 @723  		virt_addr = acpi_os_ioremap(phys_addr, size);
e615bf5b551986 Myron Stowe         2012-01-20  724  		if (!virt_addr)
e615bf5b551986 Myron Stowe         2012-01-20  725  			return AE_BAD_ADDRESS;
e615bf5b551986 Myron Stowe         2012-01-20  726  		unmap = true;
e615bf5b551986 Myron Stowe         2012-01-20  727  	}
e615bf5b551986 Myron Stowe         2012-01-20  728  
e615bf5b551986 Myron Stowe         2012-01-20  729  	if (!value)
e615bf5b551986 Myron Stowe         2012-01-20  730  		value = &dummy;
e615bf5b551986 Myron Stowe         2012-01-20  731  
eeb2d80d502af2 Srinivas Pandruvada 2017-10-05  732  	error = acpi_os_read_iomem(virt_addr, value, width);
eeb2d80d502af2 Srinivas Pandruvada 2017-10-05  733  	BUG_ON(error);
e615bf5b551986 Myron Stowe         2012-01-20  734  
e615bf5b551986 Myron Stowe         2012-01-20  735  	if (unmap)
e615bf5b551986 Myron Stowe         2012-01-20  736  		iounmap(virt_addr);
e615bf5b551986 Myron Stowe         2012-01-20  737  	else
e615bf5b551986 Myron Stowe         2012-01-20  738  		rcu_read_unlock();
e615bf5b551986 Myron Stowe         2012-01-20  739  
e615bf5b551986 Myron Stowe         2012-01-20  740  	return AE_OK;
e615bf5b551986 Myron Stowe         2012-01-20  741  }
e615bf5b551986 Myron Stowe         2012-01-20  742  

:::::: The code at line 723 was first introduced by commit
:::::: e615bf5b5519862ab66172f4dec7455d6543a578 ACPI, APEI: Add 64-bit read/write support for APEI on i386

:::::: TO: Myron Stowe <mstowe@redhat.com>
:::::: CC: Len Brown <len.brown@intel.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-22 19:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-22 19:45 drivers/acpi/osl.c:723:27: sparse: sparse: incorrect type in assignment (different address spaces) kernel test robot

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).