kexec: Replace __ASSEMBLY__ with __ASSEMBLER__ in header file
Subsystems (3)
PATCH 1/1 kexec: Replace __ASSEMBLY__ with __ASSEMBLER__ in header file
From: Thomas Huth <[email protected]>
While the GCC and Clang compilers already define __ASSEMBLER__ automatically when compiling assembly code, __ASSEMBLY__ is a macro that only gets defined by the Makefiles in the kernel. This can be very confusing when switching between userspace and kernelspace coding, or when dealing with uapi headers that rather should use __ASSEMBLER__ instead. So let's standardize now on the __ASSEMBLER__ macro that is provided by the compilers.
---
Note: This patch has been split from an earlier bigger patch of mine to ease reviewing.
include/linux/kexec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/kexec.h +1 -1
@@ -13,7 +13,7 @@#define IND_SOURCE (1 << IND_SOURCE_BIT)#define IND_FLAGS (IND_DESTINATION | IND_INDIRECTION | IND_DONE | IND_SOURCE) -#if !defined(__ASSEMBLY__) +#if !defined(__ASSEMBLER__)#include <linux/vmcore_info.h> #include <linux/crash_reserve.h>
Signature · 1 line
2.54.0
Quoted 9 lines · Thomas Huth
From: Thomas Huth <[email protected]>
While the GCC and Clang compilers already define
__ASSEMBLER__automatically when compiling assembly code,__ASSEMBLY__is a macro that only gets defined by the Makefiles in the kernel. This can be very confusing when switching between userspace and kernelspace coding, or when dealing with uapi headers that rather should use__ASSEMBLER__instead. So let's standardize now on the__ASSEMBLER__macro that is provided by the compilers.
Sounds reasonable.
Quoted 2 lines
Signed-off-by Thomas Huth <[email protected]>
[...]
Signature · 2 lines
Regards, Pratyush Yadav
Quoted 1 line · Thomas Huth
kexec: Replace
__ASSEMBLY__with__ASSEMBLER__in header file
Applied to kexec-misc branch of liveupdate/linux.git tree, thanks!
[1/1] kexec: Replace __ASSEMBLY__ with __ASSEMBLER__ in header file
commit: 6a673b6c419a5b5bf7457f33b80a77f842057066
tree: https://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux
branch: kexec-misc
--
Sincerely yours,
Mike.