diff mbox series

ACPI/NUMA: Consolidate header includes

Message ID 20240606185200.1596-3-thorsten.blum@toblux.com
State New
Headers show
Series ACPI/NUMA: Consolidate header includes | expand

Commit Message

Thorsten Blum June 6, 2024, 6:52 p.m. UTC
The header file acpi/acpi_numa.h is included whether CONFIG_ACPI is
defined or not.

Include it only once before the #ifdef/#else/#endif preprocessor
directives and fix the following make includecheck warning:

	acpi/acpi_numa.h is included more than once

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
---
 include/linux/acpi.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Rafael J. Wysocki June 13, 2024, 7:18 p.m. UTC | #1
On Thu, Jun 6, 2024 at 8:53 PM Thorsten Blum <thorsten.blum@toblux.com> wrote:
>
> The header file acpi/acpi_numa.h is included whether CONFIG_ACPI is
> defined or not.
>
> Include it only once before the #ifdef/#else/#endif preprocessor
> directives and fix the following make includecheck warning:
>
>         acpi/acpi_numa.h is included more than once
>
> Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
> ---
>  include/linux/acpi.h | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/include/linux/acpi.h b/include/linux/acpi.h
> index 28c3fb2bef0d..bb18e7bf8826 100644
> --- a/include/linux/acpi.h
> +++ b/include/linux/acpi.h
> @@ -24,6 +24,7 @@ struct irq_domain_ops;
>  #define _LINUX
>  #endif
>  #include <acpi/acpi.h>
> +#include <acpi/acpi_numa.h>
>
>  #ifdef CONFIG_ACPI
>
> @@ -35,7 +36,6 @@ struct irq_domain_ops;
>
>  #include <acpi/acpi_bus.h>
>  #include <acpi/acpi_drivers.h>
> -#include <acpi/acpi_numa.h>
>  #include <acpi/acpi_io.h>
>  #include <asm/acpi.h>
>
> @@ -777,8 +777,6 @@ const char *acpi_get_subsystem_id(acpi_handle handle);
>  #define acpi_dev_uid_match(adev, uid2)                 (adev && false)
>  #define acpi_dev_hid_uid_match(adev, hid2, uid2)       (adev && false)
>
> -#include <acpi/acpi_numa.h>
> -
>  struct fwnode_handle;
>
>  static inline bool acpi_dev_found(const char *hid)
> --

Applied as 6.11 material, thanks!
diff mbox series

Patch

diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 28c3fb2bef0d..bb18e7bf8826 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -24,6 +24,7 @@  struct irq_domain_ops;
 #define _LINUX
 #endif
 #include <acpi/acpi.h>
+#include <acpi/acpi_numa.h>
 
 #ifdef	CONFIG_ACPI
 
@@ -35,7 +36,6 @@  struct irq_domain_ops;
 
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
-#include <acpi/acpi_numa.h>
 #include <acpi/acpi_io.h>
 #include <asm/acpi.h>
 
@@ -777,8 +777,6 @@  const char *acpi_get_subsystem_id(acpi_handle handle);
 #define acpi_dev_uid_match(adev, uid2)			(adev && false)
 #define acpi_dev_hid_uid_match(adev, hid2, uid2)	(adev && false)
 
-#include <acpi/acpi_numa.h>
-
 struct fwnode_handle;
 
 static inline bool acpi_dev_found(const char *hid)