Skip to contentSkip to conversation

ACPI: Drop ACPI_USE_BUILTIN_STDARG ifdef from acgcc.h

PATCH In review Rafael J. Wysocki 2 participants 2 messages Nov 3, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: Drop ACPI_USE_BUILTIN_STDARG ifdef from acgcc.h

From: Rafael J. Wysocki <[email protected]>

The ACPI_USE_BUILTIN_STDARG symbol is never set in the kernel build, so stop checking it in include/acpi/platform/acgcc.h and drop all of the macros depending on it (which appear to duplicate the analogous macros from linux/stdarg.h, but in fact are never used).

---
 include/acpi/platform/acgcc.h |   13 -------------
 1 file changed, 13 deletions(-)
include/acpi/platform/acgcc.h +0 -13
Index: linux-pm/include/acpi/platform/acgcc.h
===================================================================
@@ -10,25 +10,12 @@
 #ifndef __ACGCC_H__
 #define __ACGCC_H__
 
-/*
- * Use compiler specific <stdarg.h> is a good practice for even when
- * -nostdinc is specified (i.e., ACPI_USE_STANDARD_HEADERS undefined.
- */
 #ifndef va_arg
-#ifdef ACPI_USE_BUILTIN_STDARG
-typedef __builtin_va_list va_list;
-#define va_start(v, l)          __builtin_va_start(v, l)
-#define va_end(v)               __builtin_va_end(v)
-#define va_arg(v, l)            __builtin_va_arg(v, l)
-#define va_copy(d, s)           __builtin_va_copy(d, s)
-#else
 #ifdef __KERNEL__
 #include <linux/stdarg.h>
 #else
-/* Used to build acpi tools */
 #include <stdarg.h>
 #endif /* __KERNEL__ */
-#endif /* ACPI_USE_BUILTIN_STDARG */
 #endif /* ! va_arg */
 
 #define ACPI_INLINE             __inline__
#1 lore raw
Quoted 5 lines · Rafael J. Wysocki

The ACPI_USE_BUILTIN_STDARG symbol is never set in the kernel build, so stop checking it in include/acpi/platform/acgcc.h and drop all of the macros depending on it (which appear to duplicate the analogous macros from linux/stdarg.h, but in fact are never used).

Ack. Thanks,

Linus