linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI: PM: Fix "multiple definition of acpi_sleep_state_supported" for ARM64
@ 2019-07-05 20:18 Dexuan Cui
  2019-07-06  7:53 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Dexuan Cui @ 2019-07-05 20:18 UTC (permalink / raw)
  To: Pavel Machek, Michael Kelley, linux-acpi, rjw, lenb,
	robert.moore, erik.schmauss, Russell King, Russ Dill,
	Sebastian Capella, Lorenzo Pieralisi,
	Russell King - ARM Linux admin
  Cc: linux-hyperv, linux-kernel, KY Srinivasan, Stephen Hemminger,
	Haiyang Zhang, Sasha Levin, olaf, apw, jasowang, vkuznets,
	marcelo.cerri


If CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT is not set, the dummy version of
the function should be static.

Fixes: 1e2c3f0f1e93 ("ACPI: PM: Make acpi_sleep_state_supported() non-static")
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Reported-by: kbuild test robot <lkp@intel.com>
---

Sorry for not doing it right in the previous patch!

The patch fixes the build errors on ARM64:

   drivers/net/ethernet/qualcomm/emac/emac-phy.o: In function `acpi_sleep_state_supported':
>> emac-phy.c:(.text+0x1d8): multiple definition of `acpi_sleep_state_supported'
   drivers/net/ethernet/qualcomm/emac/emac.o:emac.c:(.text+0xbf8): first defined here
   drivers/net/ethernet/qualcomm/emac/emac-sgmii.o: In function `acpi_sleep_state_supported':
   emac-sgmii.c:(.text+0x548): multiple definition of `acpi_sleep_state_supported'
   drivers/net/ethernet/qualcomm/emac/emac.o:emac.c:(.text+0xbf8): first defined here


 include/acpi/acpi_bus.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 4ce59bdc852e..8ffc4acf2b56 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -657,7 +657,7 @@ static inline int acpi_pm_set_bridge_wakeup(struct device *dev, bool enable)
 #ifdef CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT
 bool acpi_sleep_state_supported(u8 sleep_state);
 #else
-bool acpi_sleep_state_supported(u8 sleep_state) { return false; }
+static bool acpi_sleep_state_supported(u8 sleep_state) { return false; }
 #endif
 
 #ifdef CONFIG_ACPI_SLEEP
-- 
2.17.1


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

* Re: [PATCH] ACPI: PM: Fix "multiple definition of acpi_sleep_state_supported" for ARM64
  2019-07-05 20:18 [PATCH] ACPI: PM: Fix "multiple definition of acpi_sleep_state_supported" for ARM64 Dexuan Cui
@ 2019-07-06  7:53 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2019-07-06  7:53 UTC (permalink / raw)
  To: Dexuan Cui
  Cc: Pavel Machek, Michael Kelley, linux-acpi, rjw, lenb,
	robert.moore, erik.schmauss, Russell King, Russ Dill,
	Sebastian Capella, Lorenzo Pieralisi,
	Russell King - ARM Linux admin, linux-hyperv, linux-kernel,
	KY Srinivasan, Stephen Hemminger, Haiyang Zhang, Sasha Levin,
	olaf, apw, jasowang, vkuznets, marcelo.cerri

On Fri, Jul 5, 2019 at 10:18 PM Dexuan Cui <decui@microsoft.com> wrote:
>
>
> If CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT is not set, the dummy version of
> the function should be static.
>
> Fixes: 1e2c3f0f1e93 ("ACPI: PM: Make acpi_sleep_state_supported() non-static")
> Signed-off-by: Dexuan Cui <decui@microsoft.com>
> Reported-by: kbuild test robot <lkp@intel.com>
> ---
>
> Sorry for not doing it right in the previous patch!
>
> The patch fixes the build errors on ARM64:
>
>    drivers/net/ethernet/qualcomm/emac/emac-phy.o: In function `acpi_sleep_state_supported':
> >> emac-phy.c:(.text+0x1d8): multiple definition of `acpi_sleep_state_supported'
>    drivers/net/ethernet/qualcomm/emac/emac.o:emac.c:(.text+0xbf8): first defined here
>    drivers/net/ethernet/qualcomm/emac/emac-sgmii.o: In function `acpi_sleep_state_supported':
>    emac-sgmii.c:(.text+0x548): multiple definition of `acpi_sleep_state_supported'
>    drivers/net/ethernet/qualcomm/emac/emac.o:emac.c:(.text+0xbf8): first defined here
>
>
>  include/acpi/acpi_bus.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
> index 4ce59bdc852e..8ffc4acf2b56 100644
> --- a/include/acpi/acpi_bus.h
> +++ b/include/acpi/acpi_bus.h
> @@ -657,7 +657,7 @@ static inline int acpi_pm_set_bridge_wakeup(struct device *dev, bool enable)
>  #ifdef CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT
>  bool acpi_sleep_state_supported(u8 sleep_state);
>  #else
> -bool acpi_sleep_state_supported(u8 sleep_state) { return false; }
> +static bool acpi_sleep_state_supported(u8 sleep_state) { return false; }

This should be static inline even.

I've reapplied the original patch with this change folded in.

Thanks!

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

end of thread, other threads:[~2019-07-06  7:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-05 20:18 [PATCH] ACPI: PM: Fix "multiple definition of acpi_sleep_state_supported" for ARM64 Dexuan Cui
2019-07-06  7:53 ` Rafael J. Wysocki

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).