oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sunil V L <sunilvl@ventanamicro.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Palmer Dabbelt <palmer@rivosinc.com>,
	Andrew Jones <ajones@ventanamicro.com>,
	Conor Dooley <conor.dooley@microchip.com>
Subject: drivers/acpi/osl.c:723:27: sparse: sparse: incorrect type in assignment (different address spaces)
Date: Sun, 23 Jul 2023 03:45:15 +0800	[thread overview]
Message-ID: <202307230357.egcTAefj-lkp@intel.com> (raw)

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

                 reply	other threads:[~2023-07-22 19:45 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=202307230357.egcTAefj-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ajones@ventanamicro.com \
    --cc=conor.dooley@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=palmer@rivosinc.com \
    --cc=sunilvl@ventanamicro.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;
as well as URLs for NNTP newsgroup(s).