[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202307230357.egcTAefj-lkp@intel.com>
Date: Sun, 23 Jul 2023 03:45:15 +0800
From: kernel test robot <lkp@...el.com>
To: Sunil V L <sunilvl@...tanamicro.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Palmer Dabbelt <palmer@...osinc.com>,
Andrew Jones <ajones@...tanamicro.com>,
Conor Dooley <conor.dooley@...rochip.com>
Subject: drivers/acpi/osl.c:723:27: sparse: sparse: incorrect type in
assignment (different address spaces)
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@...el.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@...hat.com>
:::::: CC: Len Brown <len.brown@...el.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists