linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ACPI: processor: Fix a prepocessor warning
@ 2021-04-01  2:39 Shixin Liu
  2021-04-01  8:21 ` Vitaly Kuznetsov
  0 siblings, 1 reply; 2+ messages in thread
From: Shixin Liu @ 2021-04-01  2:39 UTC (permalink / raw)
  To: Vitaly Kuznetsov, Rafael J. Wysocki, Len Brown
  Cc: linux-acpi, linux-kernel, Shixin Liu

When compiling with defconfig on x86_64, I got a warning:

drivers/acpi/processor_idle.c: In function ‘acpi_idle_play_dead’:
drivers/acpi/processor_idle.c:542:15: warning: extra tokens at end of #ifdef directive
  542 | #ifdef defined(CONFIG_X86) && defined(CONFIG_HOTPLUG_CPU)
      |

Fixes: bc5706eaeae0 ("ACPI: processor: Fix CPU0 wakeup in acpi_idle_play_dead()")
Signed-off-by: Shixin Liu <liushixin2@huawei.com>
---
 drivers/acpi/processor_idle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 19fb28a8005b..0925b1477230 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -539,7 +539,7 @@ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index)
 		} else
 			return -ENODEV;
 
-#ifdef defined(CONFIG_X86) && defined(CONFIG_HOTPLUG_CPU)
+#if defined(CONFIG_X86) && defined(CONFIG_HOTPLUG_CPU)
 		/* If NMI wants to wake up CPU0, start CPU0. */
 		if (wakeup_cpu0())
 			start_cpu0();
-- 
2.25.1


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

* Re: [PATCH -next] ACPI: processor: Fix a prepocessor warning
  2021-04-01  2:39 [PATCH -next] ACPI: processor: Fix a prepocessor warning Shixin Liu
@ 2021-04-01  8:21 ` Vitaly Kuznetsov
  0 siblings, 0 replies; 2+ messages in thread
From: Vitaly Kuznetsov @ 2021-04-01  8:21 UTC (permalink / raw)
  To: Shixin Liu, Rafael J. Wysocki
  Cc: linux-acpi, linux-kernel, Shixin Liu, Len Brown

Shixin Liu <liushixin2@huawei.com> writes:

> When compiling with defconfig on x86_64, I got a warning:
>
> drivers/acpi/processor_idle.c: In function ‘acpi_idle_play_dead’:
> drivers/acpi/processor_idle.c:542:15: warning: extra tokens at end of #ifdef directive
>   542 | #ifdef defined(CONFIG_X86) && defined(CONFIG_HOTPLUG_CPU)
>       |
>
> Fixes: bc5706eaeae0 ("ACPI: processor: Fix CPU0 wakeup in acpi_idle_play_dead()")
> Signed-off-by: Shixin Liu <liushixin2@huawei.com>
> ---
>  drivers/acpi/processor_idle.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
> index 19fb28a8005b..0925b1477230 100644
> --- a/drivers/acpi/processor_idle.c
> +++ b/drivers/acpi/processor_idle.c
> @@ -539,7 +539,7 @@ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index)
>  		} else
>  			return -ENODEV;
>  
> -#ifdef defined(CONFIG_X86) && defined(CONFIG_HOTPLUG_CPU)
> +#if defined(CONFIG_X86) && defined(CONFIG_HOTPLUG_CPU)
>  		/* If NMI wants to wake up CPU0, start CPU0. */
>  		if (wakeup_cpu0())
>  			start_cpu0();

Thank you for the patch,

this was already reported by Stephen Rothwell and I suggested Rafael the
exact same fix:

https://lore.kernel.org/lkml/87czvfu9j5.fsf@vitty.brq.redhat.com/

It would probably be better if we fold the fix in (if stil possible).

-- 
Vitaly


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

end of thread, other threads:[~2021-04-01  8:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01  2:39 [PATCH -next] ACPI: processor: Fix a prepocessor warning Shixin Liu
2021-04-01  8:21 ` Vitaly Kuznetsov

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