There is an ongoing effort to replace the usage of __ASSEMBLY__ with __ASSEMBLER__ throughout the kernel tree, see for example commit 287d163322b7 ("arm64: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers"). The latter is automatically provided by all compilers and preprocessors supported by the kernel, so the explicit definitions of __ASSEMBLY__ can be removed. However the UAPI headers might be used with non-GCC-compatible compilers, which do not define __ASSEMBLER__ automatically. So this migration may break users. Also during the migration phase, the UAPI headers will use a mix of *both* __ASSEMBLY__ and __ASSEMBLER__ at the same time, which is ugly and inconsistent. For now make sure that the exported UAPI headers consistently use __ASSEMBLY__ as before.
Unified · Split
| @@ -36,6 +36,7 @@ sed -E -e ' · 35 unmodified lines | ||
| 36 | 36 | s/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g |
| 37 | 37 | s/(^|[[:space:](])(inline|asm|volatile)([[:space:](]|$)/\1__\2__\3/g |
| 38 | 38 | s@#(ifndef|define|endif[[:space:]]*/[*])[[:space:]]*_UAPI@#\1 @ |
| 39 | + s/__ASSEMBLER__/__ASSEMBLY__/g | |
| 39 | 40 | ' $INFILE > $TMPFILE || exit 1 |
| 40 | 41 | |
| 41 | 42 | scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ $TMPFILE > $OUTFILE |