arch: c6x: uapi: be sure of "_UAPI" prefix for all guard macros
PATCH 1/1 arch: c6x: uapi: be sure of "_UAPI" prefix for all guard macros
For all uapi headers, need use "_UAPI" prefix for its guard macro (which will be stripped by "scripts/headers_installer.sh").
Also be sure that all files have their guard macros.
Also be sure that all "#endif" are followed with correct comments.
--- arch/c6x/include/uapi/asm/byteorder.h | 6 +++--- arch/c6x/include/uapi/asm/ptrace.h | 1 + arch/c6x/include/uapi/asm/sigcontext.h | 7 +++---- arch/c6x/include/uapi/asm/swab.h | 6 +++--- arch/c6x/include/uapi/asm/unistd.h | 4 ++++ 5 files changed, 14 insertions(+), 10 deletions(-)
arch/c6x/include/uapi/asm/byteorder.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _ASM_C6X_BYTEORDER_H -#define _ASM_C6X_BYTEORDER_H +#ifndef _UAPI_ASM_C6X_BYTEORDER_H +#define _UAPI_ASM_C6X_BYTEORDER_H#include <asm/types.h>
@@ -9,4 +9,4 @@#include <linux/byteorder/little_endian.h> #endif /* _BIG_ENDIAN */ -#endif /* _ASM_BYTEORDER_H */ +#endif /* _UAPI_ASM_C6X_BYTEORDER_H */
arch/c6x/include/uapi/asm/ptrace.h +1 -0
@@ -160,4 +160,5 @@ struct pt_regs { };#endif /* __ASSEMBLY__ */ +#endif /* _UAPI_ASM_C6X_PTRACE_H */
arch/c6x/include/uapi/asm/sigcontext.h +3 -4
@@ -8,9 +8,8 @@* it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#ifndef _ASM_C6X_SIGCONTEXT_H -#define _ASM_C6X_SIGCONTEXT_H - +#ifndef _UAPI_ASM_C6X_SIGCONTEXT_H +#define _UAPI_ASM_C6X_SIGCONTEXT_H struct sigcontext { unsigned long sc_mask; /* old sigmask */
@@ -77,4 +76,4 @@ struct sigcontext { unsigned long sc_pc; }; -#endif /* _ASM_C6X_SIGCONTEXT_H */ +#endif /* _UAPI_ASM_C6X_SIGCONTEXT_H */
arch/c6x/include/uapi/asm/swab.h +3 -3
@@ -6,8 +6,8 @@* it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#ifndef _ASM_C6X_SWAB_H -#define _ASM_C6X_SWAB_H +#ifndef _UAPI_ASM_C6X_SWAB_H +#define _UAPI_ASM_C6X_SWAB_H static inline __attribute_const__ __u16 __c6x_swab16(__u16 val) {
@@ -51,4 +51,4 @@ static inline __attribute_const__ __u32 __c6x_swahb32(__u32 val)#define __arch_swahw32 __c6x_swahw32#define __arch_swahb32 __c6x_swahb32 -#endif /* _ASM_C6X_SWAB_H */ +#endif /* _UAPI_ASM_C6X_SWAB_H */
arch/c6x/include/uapi/asm/unistd.h +4 -0
@@ -13,6 +13,8 @@* NON INFRINGEMENT. See the GNU General Public License for * more details. */ +#ifndef _UAPI_ASM_C6X_UNISTD_H +#define _UAPI_ASM_C6X_UNISTD_H#define __ARCH_WANT_SYS_CLONE
@@ -22,3 +24,5 @@/* C6X-specific syscalls. */ #define __NR_cache_sync (__NR_arch_specific_syscall + 0) __SYSCALL(__NR_cache_sync, sys_cache_sync) + +#endif /* _UAPI_ASM_C6X_UNISTD_H */
Signature · 1 line
1.7.11.7
Quoted 9 lines · Chen Gang
For all uapi headers, need use "
_UAPI" prefix for its guard macro (which will be stripped by "scripts/headers_installer.sh").Also be sure that all files have their guard macros.
Also be sure that all "#endif" are followed with correct comments.
Signed-off-by Chen Gang <[email protected]>
Quoted 4 lines · Mark Salter
Quoted 3 lines · Chen Gang
For all uapi headers, need use "
_UAPI" prefix for its guard macro (which will be stripped by "scripts/headers_installer.sh").
Quoted 10 lines
Quoted 6 lines
Also be sure that all files have their guard macros.
Also be sure that all "#endif" are followed with correct comments.
Signed-off-by Chen Gang <[email protected]>Acked-by Mark Salter <[email protected]>
Thank you very much!! :-)
Thanks.
Signature · 1 line
Chen Gang