Skip to content

Commit 42398ca

Browse files
huthAlexander Gordeev
authored andcommitted
s390: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
While the GCC and Clang compilers already define __ASSEMBLER__ automatically when compiling assembler code, __ASSEMBLY__ is a macro that only gets defined by the Makefiles in the kernel. This is bad since macros starting with two underscores are names that are reserved by the C language. It can also be very confusing for the developers when switching between userspace and kernelspace coding, or when dealing with uapi headers that rather should use __ASSEMBLER__ instead. So let's now standardize on the __ASSEMBLER__ macro that is provided by the compilers. This is a completely mechanical patch (done with a simple "sed -i" statement), with some manual fixups done later while rebasing the patch. Signed-off-by: Thomas Huth <[email protected]> Acked-by: Heiko Carstens <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexander Gordeev <[email protected]>
1 parent 9b27182 commit 42398ca

33 files changed

+65
-65
lines changed

arch/s390/boot/boot.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#define IPL_START 0x200
88

9-
#ifndef __ASSEMBLY__
9+
#ifndef __ASSEMBLER__
1010

1111
#include <linux/printk.h>
1212
#include <asm/physmem_info.h>
@@ -121,5 +121,5 @@ static inline bool intersects(unsigned long addr0, unsigned long size0,
121121
{
122122
return addr0 + size0 > addr1 && addr1 + size1 > addr0;
123123
}
124-
#endif /* __ASSEMBLY__ */
124+
#endif /* __ASSEMBLER__ */
125125
#endif /* BOOT_BOOT_H */

arch/s390/include/asm/alternative.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
ALT_TYPE_SPEC << ALT_TYPE_SHIFT | \
5252
(facility) << ALT_DATA_SHIFT)
5353

54-
#ifndef __ASSEMBLY__
54+
#ifndef __ASSEMBLER__
5555

5656
#include <linux/types.h>
5757
#include <linux/stddef.h>
@@ -183,7 +183,7 @@ static inline void apply_alternatives(struct alt_instr *start, struct alt_instr
183183
/* Use this macro if clobbers are needed without inputs. */
184184
#define ASM_NO_INPUT_CLOBBER(clobber...) : clobber
185185

186-
#else /* __ASSEMBLY__ */
186+
#else /* __ASSEMBLER__ */
187187

188188
/*
189189
* Issue one struct alt_instr descriptor entry (need to put it into
@@ -233,6 +233,6 @@ static inline void apply_alternatives(struct alt_instr *start, struct alt_instr
233233
.popsection
234234
.endm
235235

236-
#endif /* __ASSEMBLY__ */
236+
#endif /* __ASSEMBLER__ */
237237

238238
#endif /* _ASM_S390_ALTERNATIVE_H */

arch/s390/include/asm/asm-const.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#ifndef _ASM_S390_ASM_CONST_H
33
#define _ASM_S390_ASM_CONST_H
44

5-
#ifdef __ASSEMBLY__
5+
#ifdef __ASSEMBLER__
66
# define stringify_in_c(...) __VA_ARGS__
77
#else
88
/* This version of stringify will deal with commas... */

arch/s390/include/asm/cpu.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef _ASM_S390_CPU_H
1010
#define _ASM_S390_CPU_H
1111

12-
#ifndef __ASSEMBLY__
12+
#ifndef __ASSEMBLER__
1313

1414
#include <linux/types.h>
1515
#include <linux/jump_label.h>
@@ -24,5 +24,5 @@ struct cpuid
2424

2525
DECLARE_STATIC_KEY_FALSE(cpu_has_bear);
2626

27-
#endif /* __ASSEMBLY__ */
27+
#endif /* __ASSEMBLER__ */
2828
#endif /* _ASM_S390_CPU_H */

arch/s390/include/asm/cpu_mf-insn.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifndef _ASM_S390_CPU_MF_INSN_H
99
#define _ASM_S390_CPU_MF_INSN_H
1010

11-
#ifdef __ASSEMBLY__
11+
#ifdef __ASSEMBLER__
1212

1313
/* Macro to generate the STCCTM instruction with a customized
1414
* M3 field designating the counter set.
@@ -17,6 +17,6 @@
1717
.insn rsy,0xeb0000000017,\r1,\m3 & 0xf,\db2
1818
.endm
1919

20-
#endif /* __ASSEMBLY__ */
20+
#endif /* __ASSEMBLER__ */
2121

2222
#endif

arch/s390/include/asm/ctlreg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
#define CR14_EXTERNAL_DAMAGE_SUBMASK BIT(CR14_EXTERNAL_DAMAGE_SUBMASK_BIT)
8181
#define CR14_WARNING_SUBMASK BIT(CR14_WARNING_SUBMASK_BIT)
8282

83-
#ifndef __ASSEMBLY__
83+
#ifndef __ASSEMBLER__
8484

8585
#include <linux/bug.h>
8686

@@ -252,5 +252,5 @@ union ctlreg15 {
252252
};
253253
};
254254

255-
#endif /* __ASSEMBLY__ */
255+
#endif /* __ASSEMBLER__ */
256256
#endif /* __ASM_S390_CTLREG_H */

arch/s390/include/asm/dwarf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#ifndef _ASM_S390_DWARF_H
33
#define _ASM_S390_DWARF_H
44

5-
#ifdef __ASSEMBLY__
5+
#ifdef __ASSEMBLER__
66

77
#define CFI_STARTPROC .cfi_startproc
88
#define CFI_ENDPROC .cfi_endproc
@@ -33,6 +33,6 @@
3333
.cfi_sections .eh_frame, .debug_frame
3434
#endif
3535

36-
#endif /* __ASSEMBLY__ */
36+
#endif /* __ASSEMBLER__ */
3737

3838
#endif /* _ASM_S390_DWARF_H */

arch/s390/include/asm/extmem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#ifndef _ASM_S390X_DCSS_H
88
#define _ASM_S390X_DCSS_H
9-
#ifndef __ASSEMBLY__
9+
#ifndef __ASSEMBLER__
1010

1111
/*
1212
* DCSS segment is defined as a contiguous range of pages using DEFSEG command.

arch/s390/include/asm/fpu-insn-asm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#error only <asm/fpu-insn.h> can be included directly
1717
#endif
1818

19-
#ifdef __ASSEMBLY__
19+
#ifdef __ASSEMBLER__
2020

2121
/* Macros to generate vector instruction byte code */
2222

@@ -750,5 +750,5 @@
750750
MRXBOPC 0, 0x77, v1, v2, v3
751751
.endm
752752

753-
#endif /* __ASSEMBLY__ */
753+
#endif /* __ASSEMBLER__ */
754754
#endif /* __ASM_S390_FPU_INSN_ASM_H */

arch/s390/include/asm/fpu-insn.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include <asm/fpu-insn-asm.h>
1111

12-
#ifndef __ASSEMBLY__
12+
#ifndef __ASSEMBLER__
1313

1414
#include <linux/instrumented.h>
1515
#include <asm/asm-extable.h>
@@ -475,5 +475,5 @@ static __always_inline void fpu_vzero(u8 v)
475475
: "memory");
476476
}
477477

478-
#endif /* __ASSEMBLY__ */
478+
#endif /* __ASSEMBLER__ */
479479
#endif /* __ASM_S390_FPU_INSN_H */

0 commit comments

Comments
 (0)