Linux-ACPI Archive on lore.kernel.org
 help / color / Atom feed
* [pm:acpica-osl 6/6] drivers/acpi/osl.c:1748:46: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2020-09-05 18:33 kernel test robot
  2020-10-14 20:36 ` [Devel] " Moore, Robert
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2020-09-05 18:33 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: kbuild-all, linux-acpi, devel, linux-pm


[-- Attachment #1: Type: text/plain, Size: 3672 bytes --]

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@intel.com>


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@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 42513 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [Devel] [pm:acpica-osl 6/6] drivers/acpi/osl.c:1748:46: sparse: sparse: incorrect type in assignment (different address spaces)
  2020-09-05 18:33 [pm:acpica-osl 6/6] drivers/acpi/osl.c:1748:46: sparse: sparse: incorrect type in assignment (different address spaces) kernel test robot
@ 2020-10-14 20:36 ` Moore, Robert
  2020-10-15 11:35   ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Moore, Robert @ 2020-10-14 20:36 UTC (permalink / raw)
  To: lkp, Rafael J. Wysocki, Kaneda, Erik
  Cc: kbuild-all, linux-acpi, devel, linux-pm

I believe the file " drivers/acpi/osl.c " is part of the core linux, not ACPICA.

-----Original Message-----
From: kernel test robot <lkp@intel.com> 
Sent: Saturday, September 05, 2020 11:34 AM
To: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: kbuild-all@lists.01.org; linux-acpi@vger.kernel.org; devel@acpica.org; linux-pm@vger.kernel.org
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@intel.com>


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@lists.01.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Devel] [pm:acpica-osl 6/6] drivers/acpi/osl.c:1748:46: sparse: sparse: incorrect type in assignment (different address spaces)
  2020-10-14 20:36 ` [Devel] " Moore, Robert
@ 2020-10-15 11:35   ` Rafael J. Wysocki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2020-10-15 11:35 UTC (permalink / raw)
  To: Moore, Robert
  Cc: lkp, Rafael J. Wysocki, Kaneda, Erik, kbuild-all, linux-acpi,
	devel, linux-pm

On Wed, Oct 14, 2020 at 10:37 PM Moore, Robert <robert.moore@intel.com> 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@intel.com>
> Sent: Saturday, September 05, 2020 11:34 AM
> To: Rafael J. Wysocki <rjw@rjwysocki.net>
> Cc: kbuild-all@lists.01.org; linux-acpi@vger.kernel.org; devel@acpica.org; linux-pm@vger.kernel.org
> 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@intel.com>
>
>
> 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@lists.01.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-05 18:33 [pm:acpica-osl 6/6] drivers/acpi/osl.c:1748:46: sparse: sparse: incorrect type in assignment (different address spaces) kernel test robot
2020-10-14 20:36 ` [Devel] " Moore, Robert
2020-10-15 11:35   ` Rafael J. Wysocki

Linux-ACPI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-acpi/0 linux-acpi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-acpi linux-acpi/ https://lore.kernel.org/linux-acpi \
		linux-acpi@vger.kernel.org
	public-inbox-index linux-acpi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-acpi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git