sched: Replace __ASSEMBLY__ with __ASSEMBLER__ in sched.h header
Subsystems (2)
PATCH 1/1 sched: Replace __ASSEMBLY__ with __ASSEMBLER__ in sched.h header
While the GCC and Clang compilers already define __ASSEMBLER__ auto- matically 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. Let's standardize now on the __ASSEMBLER__ macro to avoid this confusion.
---
Note: This has been split from an earlier bigger patch of mine into
this separate patch to ease reviewing.
I also thought I had sent out this earlier already, but I cannot find the patch on lore or any other public inbox anymore, so maybe it got lost along the way. Anyway, sorry if you got this twice!
include/uapi/linux/sched.h | 2 +- tools/perf/trace/beauty/include/uapi/linux/sched.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/sched.h +1 -1
@@ -53,7 +53,7 @@*/ #define UNSHARE_EMPTY_MNTNS 0x00100000/* Unshare an empty mount namespace. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/** * struct clone_args - arguments for the clone3 syscall * @flags: Flags for the new process as listed above.
tools/perf/trace/beauty/include/uapi/linux/sched.h +1 -1
@@ -53,7 +53,7 @@*/ #define UNSHARE_EMPTY_MNTNS 0x00100000/* Unshare an empty mount namespace. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/** * struct clone_args - arguments for the clone3 syscall * @flags: Flags for the new process as listed above.
Signature · 1 line
2.55.0
[email protected]
AI reviewSashiko has reviewed this patch and found no issues. It looks great!
Quoted 9 lines
While the GCC and Clang compilers already define
__ASSEMBLER__auto- matically 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. Let's standardize now on the__ASSEMBLER__macro to avoid this confusion.Signed-off-by Thomas Huth <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
[tip: sched/core] sched/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in the <uapi/linux/sched.h> header
In reply to Thomas HuthThe following commit has been merged into the sched/core branch of tip:
The following commit has been merged into the sched/core branch of tip:
Commit-ID: a9b3c7570564de40acb0998ab85c89d546b2122f Gitweb: https://git.kernel.org/tip/a9b3c7570564de40acb0998ab85c89d546b2122f Author: Thomas Huth <[email protected]> AuthorDate: Tue, 22 Sep 2026 08:46:41 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Tue, 22 Sep 2026 10:08:38 +02:00
sched/headers: Replace __ASSEMBLY__ with __ASSEMBLER__ in the <uapi/linux/sched.h> header
While the GCC and Clang compilers already define __ASSEMBLER__ auto- matically 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. Let's standardize now on the __ASSEMBLER__ macro to avoid this confusion.
--- include/uapi/linux/sched.h | 2 +- tools/perf/trace/beauty/include/uapi/linux/sched.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/sched.h +1 -1
@@ -53,7 +53,7 @@*/ #define UNSHARE_EMPTY_MNTNS 0x00100000/* Unshare an empty mount namespace. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/** * struct clone_args - arguments for the clone3 syscall * @flags: Flags for the new process as listed above.
tools/perf/trace/beauty/include/uapi/linux/sched.h +1 -1
@@ -53,7 +53,7 @@*/ #define UNSHARE_EMPTY_MNTNS 0x00100000/* Unshare an empty mount namespace. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__/** * struct clone_args - arguments for the clone3 syscall * @flags: Flags for the new process as listed above.