Re: [Devel] [pm:acpica-osl 6/6] drivers/acpi/osl.c:1748:46: sparse: sparse: incorrect type in assignment (different address spaces)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 14, 2020 at 10:37 PM Moore, Robert <robert.moore@xxxxxxxxx> wrote:
>
> I believe the file " drivers/acpi/osl.c " is part of the core linux, not ACPICA.

Yes, it is.

> -----Original Message-----
> From: kernel test robot <lkp@xxxxxxxxx>
> Sent: Saturday, September 05, 2020 11:34 AM
> To: Rafael J. Wysocki <rjw@xxxxxxxxxxxxx>
> Cc: kbuild-all@xxxxxxxxxxxx; linux-acpi@xxxxxxxxxxxxxxx; devel@xxxxxxxxxx; linux-pm@xxxxxxxxxxxxxxx
> Subject: [Devel] [pm:acpica-osl 6/6] drivers/acpi/osl.c:1748:46: sparse: sparse: incorrect type in assignment (different address spaces)
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git acpica-osl
> head:   c32c3c4079f8a62616413abbead45b6622fb7602
> commit: c32c3c4079f8a62616413abbead45b6622fb7602 [6/6] ACPI: OSL: Make ACPICA use logical addresses of GPE blocks
> 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 c32c3c4079f8a62616413abbead45b6622fb7602
>         # 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:1748:46: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void *extern [addressable] [toplevel] acpi_gbl_xgpe0_block_logical_address @@     got void [noderef] __iomem * @@
> >> drivers/acpi/osl.c:1748:46: sparse:     expected void *extern [addressable] [toplevel] acpi_gbl_xgpe0_block_logical_address
>    drivers/acpi/osl.c:1748:46: sparse:     got void [noderef] __iomem *
> >> drivers/acpi/osl.c:1750:46: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void *extern [addressable] [toplevel] acpi_gbl_xgpe1_block_logical_address @@     got void [noderef] __iomem * @@
> >> drivers/acpi/osl.c:1750:46: sparse:     expected void *extern [addressable] [toplevel] acpi_gbl_xgpe1_block_logical_address
>    drivers/acpi/osl.c:1750:46: sparse:     got void [noderef] __iomem *
>    drivers/acpi/osl.c:1760:20: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void *rv @@     got void [noderef] __iomem * @@
>    drivers/acpi/osl.c:1760:20: sparse:     expected void *rv
>    drivers/acpi/osl.c:1760: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=c32c3c4079f8a62616413abbead45b6622fb7602
> 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 c32c3c4079f8a62616413abbead45b6622fb7602
> vim +1748 drivers/acpi/osl.c
>
>   1742
>   1743  acpi_status __init acpi_os_initialize(void)
>   1744  {
>   1745          acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1a_event_block);
>   1746          acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1b_event_block);
>   1747
> > 1748          acpi_gbl_xgpe0_block_logical_address =
>   1749                  acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe0_block);
> > 1750          acpi_gbl_xgpe1_block_logical_address =
>   1751                  acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe1_block);
>   1752
>   1753          if (acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER) {
>   1754                  /*
>   1755                   * Use acpi_os_map_generic_address to pre-map the reset
>   1756                   * register if it's in system memory.
>   1757                   */
>   1758                  void *rv;
>   1759
>   1760                  rv = acpi_os_map_generic_address(&acpi_gbl_FADT.reset_register);
>   1761                  pr_debug(PREFIX "%s: map reset_reg %s\n", __func__,
>   1762                           rv ? "successful" : "failed");
>   1763          }
>   1764          acpi_os_initialized = true;
>   1765
>   1766          return AE_OK;
>   1767  }
>   1768
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux