Skip to content

Commit 117c537

Browse files
huthguoren83
authored andcommitted
csky: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
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 on the __ASSEMBLER__ macro that is provided by the compilers now. This is a completely mechanical patch (done with a simple "sed -i" statement). Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Guo Ren (Alibaba DAMO Academy) <guoren@kernel.org>
1 parent 809ef03 commit 117c537

10 files changed

Lines changed: 16 additions & 16 deletions

File tree

arch/csky/abiv1/inc/abi/regdef.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#ifndef __ASM_CSKY_REGDEF_H
44
#define __ASM_CSKY_REGDEF_H
55

6-
#ifdef __ASSEMBLY__
6+
#ifdef __ASSEMBLER__
77
#define syscallid r1
88
#else
99
#define syscallid "r1"

arch/csky/abiv2/inc/abi/regdef.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#ifndef __ASM_CSKY_REGDEF_H
44
#define __ASM_CSKY_REGDEF_H
55

6-
#ifdef __ASSEMBLY__
6+
#ifdef __ASSEMBLER__
77
#define syscallid r7
88
#else
99
#define syscallid "r7"

arch/csky/include/asm/barrier.h

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

6-
#ifndef __ASSEMBLY__
6+
#ifndef __ASSEMBLER__
77

88
#define nop() asm volatile ("nop\n":::"memory")
99

@@ -84,5 +84,5 @@
8484

8585
#include <asm-generic/barrier.h>
8686

87-
#endif /* __ASSEMBLY__ */
87+
#endif /* __ASSEMBLER__ */
8888
#endif /* __ASM_CSKY_BARRIER_H */

arch/csky/include/asm/cache.h

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

1111
#define ARCH_DMA_MINALIGN L1_CACHE_BYTES
1212

13-
#ifndef __ASSEMBLY__
13+
#ifndef __ASSEMBLER__
1414

1515
void dcache_wb_line(unsigned long start);
1616

arch/csky/include/asm/ftrace.h

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

1212
#define MCOUNT_ADDR ((unsigned long)_mcount)
1313

14-
#ifndef __ASSEMBLY__
14+
#ifndef __ASSEMBLER__
1515

1616
extern void _mcount(unsigned long);
1717

@@ -28,5 +28,5 @@ struct dyn_arch_ftrace {
2828
void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
2929
unsigned long frame_pointer);
3030

31-
#endif /* !__ASSEMBLY__ */
31+
#endif /* !__ASSEMBLER__ */
3232
#endif /* __ASM_CSKY_FTRACE_H */

arch/csky/include/asm/jump_label.h

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

6-
#ifndef __ASSEMBLY__
6+
#ifndef __ASSEMBLER__
77

88
#include <linux/types.h>
99

@@ -48,5 +48,5 @@ void arch_jump_label_transform_static(struct jump_entry *entry,
4848
enum jump_label_type type);
4949
#define arch_jump_label_transform_static arch_jump_label_transform_static
5050

51-
#endif /* __ASSEMBLY__ */
51+
#endif /* __ASSEMBLER__ */
5252
#endif /* __ASM_CSKY_JUMP_LABEL_H */

arch/csky/include/asm/page.h

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

2727
#define PHYS_OFFSET_OFFSET (CONFIG_DRAM_BASE & (SSEG_SIZE - 1))
2828

29-
#ifndef __ASSEMBLY__
29+
#ifndef __ASSEMBLER__
3030

3131
#include <linux/pfn.h>
3232

@@ -84,5 +84,5 @@ static inline unsigned long virt_to_pfn(const void *kaddr)
8484
#include <asm-generic/memory_model.h>
8585
#include <asm-generic/getorder.h>
8686

87-
#endif /* !__ASSEMBLY__ */
87+
#endif /* !__ASSEMBLER__ */
8888
#endif /* __ASM_CSKY_PAGE_H */

arch/csky/include/asm/ptrace.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <linux/types.h>
99
#include <linux/compiler.h>
1010

11-
#ifndef __ASSEMBLY__
11+
#ifndef __ASSEMBLER__
1212

1313
#define PS_S 0x80000000 /* Supervisor Mode */
1414

@@ -98,5 +98,5 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
9898

9999
asmlinkage int syscall_trace_enter(struct pt_regs *regs);
100100
asmlinkage void syscall_trace_exit(struct pt_regs *regs);
101-
#endif /* __ASSEMBLY__ */
101+
#endif /* __ASSEMBLER__ */
102102
#endif /* __ASM_CSKY_PTRACE_H */

arch/csky/include/asm/string.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#ifndef _CSKY_STRING_MM_H_
44
#define _CSKY_STRING_MM_H_
55

6-
#ifndef __ASSEMBLY__
6+
#ifndef __ASSEMBLER__
77
#include <linux/types.h>
88
#include <linux/compiler.h>
99
#include <abi/string.h>

arch/csky/include/asm/thread_info.h

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

6-
#ifndef __ASSEMBLY__
6+
#ifndef __ASSEMBLER__
77

88
#include <asm/types.h>
99
#include <asm/page.h>
@@ -51,7 +51,7 @@ static inline struct thread_info *current_thread_info(void)
5151
return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
5252
}
5353

54-
#endif /* !__ASSEMBLY__ */
54+
#endif /* !__ASSEMBLER__ */
5555

5656
#define TIF_SIGPENDING 0 /* signal pending */
5757
#define TIF_NOTIFY_RESUME 1 /* callback before returning to user */

0 commit comments

Comments
 (0)