linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] acpi/sleep: Add header file macro definition
@ 2022-07-06  1:44 Li zeming
  2022-07-06 10:31 ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Li zeming @ 2022-07-06  1:44 UTC (permalink / raw)
  To: rafael, lenb; +Cc: linux-acpi, linux-kernel, kernel, Li zeming

Add header file macro definition.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 drivers/acpi/sleep.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/acpi/sleep.h b/drivers/acpi/sleep.h
index 7fe41ee489d6..adb3b5c13f90 100644
--- a/drivers/acpi/sleep.h
+++ b/drivers/acpi/sleep.h
@@ -1,4 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _SLEEP_H
+#define _SLEEP_H
 
 extern void acpi_enable_wakeup_devices(u8 sleep_state);
 extern void acpi_disable_wakeup_devices(u8 sleep_state);
@@ -30,3 +32,5 @@ extern bool acpi_sleep_default_s3;
 #else
 #define acpi_sleep_default_s3	(1)
 #endif
+
+#endif
-- 
2.18.2


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

* Re: [PATCH] acpi/sleep: Add header file macro definition
  2022-07-06  1:44 [PATCH] acpi/sleep: Add header file macro definition Li zeming
@ 2022-07-06 10:31 ` Rafael J. Wysocki
  2022-07-07  1:26   ` Li zeming
  0 siblings, 1 reply; 3+ messages in thread
From: Rafael J. Wysocki @ 2022-07-06 10:31 UTC (permalink / raw)
  To: Li zeming
  Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
	Linux Kernel Mailing List, kernel

On Wed, Jul 6, 2022 at 3:44 AM Li zeming <zeming@nfschina.com> wrote:
>
> Add header file macro definition.

Please explain why you want to make this change.

> Signed-off-by: Li zeming <zeming@nfschina.com>
> ---
>  drivers/acpi/sleep.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/acpi/sleep.h b/drivers/acpi/sleep.h
> index 7fe41ee489d6..adb3b5c13f90 100644
> --- a/drivers/acpi/sleep.h
> +++ b/drivers/acpi/sleep.h
> @@ -1,4 +1,6 @@
>  /* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _SLEEP_H
> +#define _SLEEP_H
>
>  extern void acpi_enable_wakeup_devices(u8 sleep_state);
>  extern void acpi_disable_wakeup_devices(u8 sleep_state);
> @@ -30,3 +32,5 @@ extern bool acpi_sleep_default_s3;
>  #else
>  #define acpi_sleep_default_s3  (1)
>  #endif
> +
> +#endif
> --
> 2.18.2
>

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

* Re: [PATCH] acpi/sleep: Add header file macro definition
  2022-07-06 10:31 ` Rafael J. Wysocki
@ 2022-07-07  1:26   ` Li zeming
  0 siblings, 0 replies; 3+ messages in thread
From: Li zeming @ 2022-07-07  1:26 UTC (permalink / raw)
  To: rafael; +Cc: kernel, lenb, linux-acpi, linux-kernel, zeming


I think the header file could avoid redefinition errors.
 at compile time by adding macro definitions.


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

end of thread, other threads:[~2022-07-07  1:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-06  1:44 [PATCH] acpi/sleep: Add header file macro definition Li zeming
2022-07-06 10:31 ` Rafael J. Wysocki
2022-07-07  1:26   ` Li zeming

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