tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git acpica-osl head: c32c3c4079f8a62616413abbead45b6622fb7602 commit: 39192732c7bbd4e54968acde6fb8dd999246aef9 [5/6] ACPI: OSL: Change the type of acpi_os_map_generic_address() return value config: x86_64-randconfig-s022-20200904 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.2-191-g10164920-dirty git checkout 39192732c7bbd4e54968acde6fb8dd999246aef9 # 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/acpi/osl.c:376:17: sparse: sparse: cast removes address space '__iomem' of expression >> drivers/acpi/osl.c:1756:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *rv @@ got void [noderef] __iomem * @@ >> drivers/acpi/osl.c:1756:20: sparse: expected void *rv >> drivers/acpi/osl.c:1756:20: sparse: got void [noderef] __iomem * drivers/acpi/osl.c:708:1: sparse: sparse: context imbalance in 'acpi_os_read_memory' - wrong count at exit drivers/acpi/osl.c:741:1: sparse: sparse: context imbalance in 'acpi_os_write_memory' - wrong count at exit # https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?id=39192732c7bbd4e54968acde6fb8dd999246aef9 git remote add pm https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git git fetch --no-tags pm acpica-osl git checkout 39192732c7bbd4e54968acde6fb8dd999246aef9 vim +1756 drivers/acpi/osl.c 4dde507fc19844 Lv Zheng 2014-02-11 1742 d362edaf5386ac Myron Stowe 2010-10-21 1743 acpi_status __init acpi_os_initialize(void) d362edaf5386ac Myron Stowe 2010-10-21 1744 { d362edaf5386ac Myron Stowe 2010-10-21 1745 acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1a_event_block); d362edaf5386ac Myron Stowe 2010-10-21 1746 acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1b_event_block); d362edaf5386ac Myron Stowe 2010-10-21 1747 acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe0_block); d362edaf5386ac Myron Stowe 2010-10-21 1748 acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe1_block); a4714a898e8520 Randy Wright 2014-06-04 1749 if (acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER) { a4714a898e8520 Randy Wright 2014-06-04 1750 /* a4714a898e8520 Randy Wright 2014-06-04 1751 * Use acpi_os_map_generic_address to pre-map the reset a4714a898e8520 Randy Wright 2014-06-04 1752 * register if it's in system memory. a4714a898e8520 Randy Wright 2014-06-04 1753 */ 39192732c7bbd4 Rafael J. Wysocki 2020-09-04 1754 void *rv; a4714a898e8520 Randy Wright 2014-06-04 1755 a4714a898e8520 Randy Wright 2014-06-04 @1756 rv = acpi_os_map_generic_address(&acpi_gbl_FADT.reset_register); 39192732c7bbd4 Rafael J. Wysocki 2020-09-04 1757 pr_debug(PREFIX "%s: map reset_reg %s\n", __func__, 39192732c7bbd4 Rafael J. Wysocki 2020-09-04 1758 rv ? "successful" : "failed"); a4714a898e8520 Randy Wright 2014-06-04 1759 } 7901a052a98169 Lv Zheng 2015-08-05 1760 acpi_os_initialized = true; d362edaf5386ac Myron Stowe 2010-10-21 1761 d362edaf5386ac Myron Stowe 2010-10-21 1762 return AE_OK; d362edaf5386ac Myron Stowe 2010-10-21 1763 } d362edaf5386ac Myron Stowe 2010-10-21 1764 :::::: The code at line 1756 was first introduced by commit :::::: a4714a898e85205e1118ec923cde43d88eb105f6 ACPI: Fix bug when ACPI reset register is implemented in system memory :::::: TO: Randy Wright <rwright@xxxxxx> :::::: CC: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip