arch: arm: uapi: be sure of "_UAPI" prefix for all guard macros
PATCH 1/1 arch: arm: 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").
Additional completions:
- be sure that all "endif" need be appended related comment, also it has and only has one empty line above and no any lines below either.
- be sure that all normal uapi header files need content guard macro.
- remove the default "kvm_para.h" which was added in Kbuild.
- remove the detail address of Free Software Foundation (or can not pass "scripts/checkpatch.pl").
--- arch/arm/include/uapi/asm/byteorder.h | 7 +++---- arch/arm/include/uapi/asm/fcntl.h | 6 +++--- arch/arm/include/uapi/asm/ioctls.h | 6 +++--- arch/arm/include/uapi/asm/kvm.h | 8 ++++---- arch/arm/include/uapi/asm/kvm_para.h | 1 - arch/arm/include/uapi/asm/mman.h | 5 +++++ arch/arm/include/uapi/asm/perf_regs.h | 7 ++++--- arch/arm/include/uapi/asm/posix_types.h | 6 +++--- arch/arm/include/uapi/asm/ptrace.h | 1 - arch/arm/include/uapi/asm/setup.h | 1 - arch/arm/include/uapi/asm/sigcontext.h | 7 +++---- arch/arm/include/uapi/asm/signal.h | 1 - arch/arm/include/uapi/asm/stat.h | 6 +++--- arch/arm/include/uapi/asm/statfs.h | 7 ++++--- 14 files changed, 35 insertions(+), 34 deletions(-) delete mode 100644 arch/arm/include/uapi/asm/kvm_para.h
arch/arm/include/uapi/asm/byteorder.h +3 -4
@@ -12,8 +12,8 @@* and word accesses (data or instruction) appear as: * d0...d31 */ -#ifndef __ASM_ARM_BYTEORDER_H -#define __ASM_ARM_BYTEORDER_H +#ifndef _UAPI__ASM_ARM_BYTEORDER_H +#define _UAPI__ASM_ARM_BYTEORDER_H#ifdef __ARMEB__#include <linux/byteorder/big_endian.h>
@@ -21,5 +21,4 @@#include <linux/byteorder/little_endian.h> #endif -#endif - +#endif /* _UAPI__ASM_ARM_BYTEORDER_H */
arch/arm/include/uapi/asm/fcntl.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _ARM_FCNTL_H -#define _ARM_FCNTL_H +#ifndef _UAPI_ARM_FCNTL_H +#define _UAPI_ARM_FCNTL_H#define O_DIRECTORY 040000/* must be a directory */ #define O_NOFOLLOW 0100000/* don't follow links */
@@ -8,4 +8,4 @@#include <asm-generic/fcntl.h> -#endif +#endif /* _UAPI_ARM_FCNTL_H */
arch/arm/include/uapi/asm/ioctls.h +3 -3
@@ -1,8 +1,8 @@ -#ifndef __ASM_ARM_IOCTLS_H -#define __ASM_ARM_IOCTLS_H +#ifndef _UAPI__ASM_ARM_IOCTLS_H +#define _UAPI__ASM_ARM_IOCTLS_H#define FIOQSIZE 0x545E#include <asm-generic/ioctls.h> -#endif +#endif /* _UAPI__ASM_ARM_IOCTLS_H */
arch/arm/include/uapi/asm/kvm.h +4 -4
@@ -13,11 +13,11 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software -* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +* Foundation (the address is in a copy of the GPL). */ -#ifndef __ARM_KVM_H__ -#define __ARM_KVM_H__ +#ifndef _UAPI__ARM_KVM_H__ +#define _UAPI__ARM_KVM_H__#include <linux/types.h> #include <asm/ptrace.h>
@@ -178,4 +178,4 @@ struct kvm_arch_memory_slot {#define KVM_PSCI_RET_INVAL ((unsigned long)-2)#define KVM_PSCI_RET_DENIED ((unsigned long)-3) -#endif /* __ARM_KVM_H__ */ +#endif /* _UAPI__ARM_KVM_H__ */
arch/arm/include/uapi/asm/kvm_para.h deleted +0 -1
@@ -1 +0,0 @@ -#include <asm-generic/kvm_para.h>
arch/arm/include/uapi/asm/mman.h +5 -0
@@ -1,4 +1,9 @@ +#ifndef _UAPI_ARM_MMAN_H +#define _UAPI_ARM_MMAN_H +#include <asm-generic/mman.h> #define arch_mmap_check (addr, len, flags) \ (((flags) & MAP_FIXED && (addr) < FIRST_USER_ADDRESS) ? -EINVAL : 0) + +#endif /* _UAPI_ARM_MMAN_H */
arch/arm/include/uapi/asm/perf_regs.h +4 -3
@@ -1,5 +1,5 @@ -#ifndef _ASM_ARM_PERF_REGS_H -#define _ASM_ARM_PERF_REGS_H +#ifndef _UAPI_ASM_ARM_PERF_REGS_H +#define _UAPI_ASM_ARM_PERF_REGS_Henum perf_event_arm_regs { PERF_REG_ARM_R0,
@@ -20,4 +20,5 @@ enum perf_event_arm_regs {PERF_REG_ARM_PC , PERF_REG_ARM_MAX, }; -#endif /* _ASM_ARM_PERF_REGS_H */ + +#endif /* _UAPI_ASM_ARM_PERF_REGS_H */
arch/arm/include/uapi/asm/posix_types.h +3 -3
@@ -10,8 +10,8 @@* Changelog: * 27-06-1996 RMK Created */ -#ifndef __ARCH_ARM_POSIX_TYPES_H -#define __ARCH_ARM_POSIX_TYPES_H +#ifndef _UAPI__ARCH_ARM_POSIX_TYPES_H +#define _UAPI__ARCH_ARM_POSIX_TYPES_H/* * This file is generally used by user-level software, so you need to
@@ -34,4 +34,4 @@ typedef unsigned short __kernel_old_dev_t;#include <asm-generic/posix_types.h> -#endif +#endif /* _UAPI__ARCH_ARM_POSIX_TYPES_H */
arch/arm/include/uapi/asm/ptrace.h +0 -1
@@ -151,7 +151,6 @@ struct pt_regs {*/ #define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ ) -#endif /* __ASSEMBLY__ */ #endif /* _UAPI__ASM_ARM_PTRACE_H */
arch/arm/include/uapi/asm/setup.h +0 -1
@@ -183,5 +183,4 @@ struct tagtable {#define for_each_tag (t,base) \ for (t = base; t->hdr.size; t = tag_next(t)) -#endif /* _UAPI__ASMARM_SETUP_H */
arch/arm/include/uapi/asm/sigcontext.h +3 -4
@@ -1,5 +1,5 @@ -#ifndef _ASMARM_SIGCONTEXT_H -#define _ASMARM_SIGCONTEXT_H +#ifndef _UAPI_ASMARM_SIGCONTEXT_H +#define _UAPI_ASMARM_SIGCONTEXT_H/* * Signal context structure - contains all info to do with the state
@@ -30,5 +30,4 @@ struct sigcontext { unsigned long fault_address; }; - -#endif +#endif /* _UAPI_ASMARM_SIGCONTEXT_H */
arch/arm/include/uapi/asm/signal.h +0 -1
@@ -116,5 +116,4 @@ typedef struct sigaltstack { size_t ss_size; } stack_t; -#endif /* _UAPI_ASMARM_SIGNAL_H */
arch/arm/include/uapi/asm/stat.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _ASMARM_STAT_H -#define _ASMARM_STAT_H +#ifndef _UAPI_ASMARM_STAT_H +#define _UAPI_ASMARM_STAT_H struct __old_kernel_stat { unsigned short st_dev;
@@ -84,4 +84,4 @@ struct stat64 { unsigned long long st_ino; }; -#endif +#endif /* _UAPI_ASMARM_STAT_H */
arch/arm/include/uapi/asm/statfs.h +4 -3
@@ -1,5 +1,5 @@ -#ifndef _ASMARM_STATFS_H -#define _ASMARM_STATFS_H +#ifndef _UAPI_ASMARM_STATFS_H +#define _UAPI_ASMARM_STATFS_H/* * With EABI there is 4 bytes of padding added to this structure.
@@ -9,4 +9,5 @@#define ARCH_PACK_STATFS64 __attribute__((packed,aligned(4)))#include <asm-generic/statfs.h> -#endif + +#endif /* _UAPI_ASMARM_STATFS_H */
Signature · 1 line
1.7.7.6
Quoted 11 lines · Chen Gang
For all uapi headers, need use "
_UAPI" prefix for its guard macro (which will be stripped by "scripts/headers_installer.sh").Additional completions:
- be sure that all "endif" need be appended related comment, also it has and only has one empty line above and no any lines below either.
- be sure that all normal uapi header files need content guard macro.
- remove the default "
kvm_para.h" which was added inKbuild.
Oh, sorry, it should use 'generic-y' instead of 'header-y' in Kbuild. I will send patch v2 for it.
Quoted 4 lines
- remove the detail address of Free Software Foundation (or can not pass "
scripts/checkpatch.pl").
Thanks.
Signature · 1 line
Chen Gang
PATCH v2 1/1 arch: arm: uapi: be sure of "_UAPI" prefix for all guard macros
In reply to Chen GangFor all uapi headers, need use "_UAPI" prefix for its guard macro (which will be stripped by "scripts/headers_installer.sh").
Additional completions:
- be sure that all "endif" need be appended related comment, also it has and only has one empty line above and no any lines below either.
- be sure that all normal uapi header files need content guard macro.
- remove the default "kvm_para.h" and add 'generic-y' in Kbuild.
- remove the detail address of Free Software Foundation (or can not pass "scripts/checkpatch.pl").
--- arch/arm/include/uapi/asm/Kbuild | 3 ++- arch/arm/include/uapi/asm/byteorder.h | 7 +++---- arch/arm/include/uapi/asm/fcntl.h | 6 +++--- arch/arm/include/uapi/asm/ioctls.h | 6 +++--- arch/arm/include/uapi/asm/kvm.h | 8 ++++---- arch/arm/include/uapi/asm/kvm_para.h | 1 - arch/arm/include/uapi/asm/mman.h | 5 +++++ arch/arm/include/uapi/asm/perf_regs.h | 7 ++++--- arch/arm/include/uapi/asm/posix_types.h | 6 +++--- arch/arm/include/uapi/asm/ptrace.h | 1 - arch/arm/include/uapi/asm/setup.h | 1 - arch/arm/include/uapi/asm/sigcontext.h | 7 +++---- arch/arm/include/uapi/asm/signal.h | 1 - arch/arm/include/uapi/asm/stat.h | 6 +++--- arch/arm/include/uapi/asm/statfs.h | 7 ++++--- 15 files changed, 37 insertions(+), 35 deletions(-) delete mode 100644 arch/arm/include/uapi/asm/kvm_para.h
arch/arm/include/uapi/asm/Kbuild +2 -1
@@ -1,11 +1,12 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm +generic-y += kvm_para.h + header-y += byteorder.h header-y += fcntl.h header-y += hwcap.h header-y += ioctls.h -header-y += kvm_para.h header-y += mman.h header-y += perf_regs.h header-y += posix_types.h
arch/arm/include/uapi/asm/byteorder.h +3 -4
@@ -12,8 +12,8 @@* and word accesses (data or instruction) appear as: * d0...d31 */ -#ifndef __ASM_ARM_BYTEORDER_H -#define __ASM_ARM_BYTEORDER_H +#ifndef _UAPI__ASM_ARM_BYTEORDER_H +#define _UAPI__ASM_ARM_BYTEORDER_H#ifdef __ARMEB__#include <linux/byteorder/big_endian.h>
@@ -21,5 +21,4 @@#include <linux/byteorder/little_endian.h> #endif -#endif - +#endif /* _UAPI__ASM_ARM_BYTEORDER_H */
arch/arm/include/uapi/asm/fcntl.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _ARM_FCNTL_H -#define _ARM_FCNTL_H +#ifndef _UAPI_ARM_FCNTL_H +#define _UAPI_ARM_FCNTL_H#define O_DIRECTORY 040000/* must be a directory */ #define O_NOFOLLOW 0100000/* don't follow links */
@@ -8,4 +8,4 @@#include <asm-generic/fcntl.h> -#endif +#endif /* _UAPI_ARM_FCNTL_H */
arch/arm/include/uapi/asm/ioctls.h +3 -3
@@ -1,8 +1,8 @@ -#ifndef __ASM_ARM_IOCTLS_H -#define __ASM_ARM_IOCTLS_H +#ifndef _UAPI__ASM_ARM_IOCTLS_H +#define _UAPI__ASM_ARM_IOCTLS_H#define FIOQSIZE 0x545E#include <asm-generic/ioctls.h> -#endif +#endif /* _UAPI__ASM_ARM_IOCTLS_H */
arch/arm/include/uapi/asm/kvm.h +4 -4
@@ -13,11 +13,11 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software -* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +* Foundation (the address is in a copy of the GPL). */ -#ifndef __ARM_KVM_H__ -#define __ARM_KVM_H__ +#ifndef _UAPI__ARM_KVM_H__ +#define _UAPI__ARM_KVM_H__#include <linux/types.h> #include <asm/ptrace.h>
@@ -178,4 +178,4 @@ struct kvm_arch_memory_slot {#define KVM_PSCI_RET_INVAL ((unsigned long)-2)#define KVM_PSCI_RET_DENIED ((unsigned long)-3) -#endif /* __ARM_KVM_H__ */ +#endif /* _UAPI__ARM_KVM_H__ */
arch/arm/include/uapi/asm/kvm_para.h deleted +0 -1
@@ -1 +0,0 @@ -#include <asm-generic/kvm_para.h>
arch/arm/include/uapi/asm/mman.h +5 -0
@@ -1,4 +1,9 @@ +#ifndef _UAPI_ARM_MMAN_H +#define _UAPI_ARM_MMAN_H +#include <asm-generic/mman.h> #define arch_mmap_check (addr, len, flags) \ (((flags) & MAP_FIXED && (addr) < FIRST_USER_ADDRESS) ? -EINVAL : 0) + +#endif /* _UAPI_ARM_MMAN_H */
arch/arm/include/uapi/asm/perf_regs.h +4 -3
@@ -1,5 +1,5 @@ -#ifndef _ASM_ARM_PERF_REGS_H -#define _ASM_ARM_PERF_REGS_H +#ifndef _UAPI_ASM_ARM_PERF_REGS_H +#define _UAPI_ASM_ARM_PERF_REGS_Henum perf_event_arm_regs { PERF_REG_ARM_R0,
@@ -20,4 +20,5 @@ enum perf_event_arm_regs {PERF_REG_ARM_PC , PERF_REG_ARM_MAX, }; -#endif /* _ASM_ARM_PERF_REGS_H */ + +#endif /* _UAPI_ASM_ARM_PERF_REGS_H */
arch/arm/include/uapi/asm/posix_types.h +3 -3
@@ -10,8 +10,8 @@* Changelog: * 27-06-1996 RMK Created */ -#ifndef __ARCH_ARM_POSIX_TYPES_H -#define __ARCH_ARM_POSIX_TYPES_H +#ifndef _UAPI__ARCH_ARM_POSIX_TYPES_H +#define _UAPI__ARCH_ARM_POSIX_TYPES_H/* * This file is generally used by user-level software, so you need to
@@ -34,4 +34,4 @@ typedef unsigned short __kernel_old_dev_t;#include <asm-generic/posix_types.h> -#endif +#endif /* _UAPI__ARCH_ARM_POSIX_TYPES_H */
arch/arm/include/uapi/asm/ptrace.h +0 -1
@@ -151,7 +151,6 @@ struct pt_regs {*/ #define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ ) -#endif /* __ASSEMBLY__ */ #endif /* _UAPI__ASM_ARM_PTRACE_H */
arch/arm/include/uapi/asm/setup.h +0 -1
@@ -183,5 +183,4 @@ struct tagtable {#define for_each_tag (t,base) \ for (t = base; t->hdr.size; t = tag_next(t)) -#endif /* _UAPI__ASMARM_SETUP_H */
arch/arm/include/uapi/asm/sigcontext.h +3 -4
@@ -1,5 +1,5 @@ -#ifndef _ASMARM_SIGCONTEXT_H -#define _ASMARM_SIGCONTEXT_H +#ifndef _UAPI_ASMARM_SIGCONTEXT_H +#define _UAPI_ASMARM_SIGCONTEXT_H/* * Signal context structure - contains all info to do with the state
@@ -30,5 +30,4 @@ struct sigcontext { unsigned long fault_address; }; - -#endif +#endif /* _UAPI_ASMARM_SIGCONTEXT_H */
arch/arm/include/uapi/asm/signal.h +0 -1
@@ -116,5 +116,4 @@ typedef struct sigaltstack { size_t ss_size; } stack_t; -#endif /* _UAPI_ASMARM_SIGNAL_H */
arch/arm/include/uapi/asm/stat.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _ASMARM_STAT_H -#define _ASMARM_STAT_H +#ifndef _UAPI_ASMARM_STAT_H +#define _UAPI_ASMARM_STAT_H struct __old_kernel_stat { unsigned short st_dev;
@@ -84,4 +84,4 @@ struct stat64 { unsigned long long st_ino; }; -#endif +#endif /* _UAPI_ASMARM_STAT_H */
arch/arm/include/uapi/asm/statfs.h +4 -3
@@ -1,5 +1,5 @@ -#ifndef _ASMARM_STATFS_H -#define _ASMARM_STATFS_H +#ifndef _UAPI_ASMARM_STATFS_H +#define _UAPI_ASMARM_STATFS_H/* * With EABI there is 4 bytes of padding added to this structure.
@@ -9,4 +9,5 @@#define ARCH_PACK_STATFS64 __attribute__((packed,aligned(4)))#include <asm-generic/statfs.h> -#endif + +#endif /* _UAPI_ASMARM_STATFS_H */
Signature · 1 line
1.7.7.6
Quoted 8 lines · Chen Gang
For all uapi headers, need use "
_UAPI" prefix for its guard macro (which will be stripped by "scripts/headers_installer.sh").Additional completions:
- be sure that all "endif" need be appended related comment, also it has and only has one empty line above and no any lines below either.
Quoted 7 lines
- be sure that all normal uapi header files need content guard macro.
- remove the default "
kvm_para.h" and add 'generic-y' inKbuild.- remove the detail address of Free Software Foundation (or can not pass "
scripts/checkpatch.pl").
for the kvm/arm part I guess it looks fine.
-Christoffer
Quoted 272 lines
Signed-off-by Chen Gang <[email protected]>--- arch/arm/include/uapi/asm/Kbuild | 3 ++- arch/arm/include/uapi/asm/byteorder.h | 7 +++---- arch/arm/include/uapi/asm/fcntl.h | 6 +++--- arch/arm/include/uapi/asm/ioctls.h | 6 +++--- arch/arm/include/uapi/asm/kvm.h | 8 ++++---- arch/arm/include/uapi/asm/kvm_para.h | 1 - arch/arm/include/uapi/asm/mman.h | 5 +++++ arch/arm/include/uapi/asm/perf_regs.h | 7 ++++--- arch/arm/include/uapi/asm/posix_types.h | 6 +++--- arch/arm/include/uapi/asm/ptrace.h | 1 - arch/arm/include/uapi/asm/setup.h | 1 - arch/arm/include/uapi/asm/sigcontext.h | 7 +++---- arch/arm/include/uapi/asm/signal.h | 1 - arch/arm/include/uapi/asm/stat.h | 6 +++--- arch/arm/include/uapi/asm/statfs.h | 7 ++++--- 15 files changed, 37 insertions(+), 35 deletions(-) delete mode 100644 arch/arm/include/uapi/asm/kvm_para.harch/arm/include/uapi/asm/Kbuild +2
-1@@ -1,11 +1,12 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm +generic-y += kvm_para.h + header-y += byteorder.h header-y += fcntl.h header-y += hwcap.h header-y += ioctls.h -header-y += kvm_para.h header-y += mman.h header-y += perf_regs.h header-y += posix_types.harch/arm/include/uapi/asm/byteorder.h +3
-4@@ -12,8 +12,8 @@* and word accesses (data or instruction) appear as: * d0...d31 */ -#ifndef __ASM_ARM_BYTEORDER_H -#define __ASM_ARM_BYTEORDER_H +#ifndef _UAPI__ASM_ARM_BYTEORDER_H +#define _UAPI__ASM_ARM_BYTEORDER_H#ifdef __ARMEB__#include <linux/byteorder/big_endian.h> @@ -21,5 +21,4 @@#include <linux/byteorder/little_endian.h> #endif -#endif - +#endif /* _UAPI__ASM_ARM_BYTEORDER_H */ arch/arm/include/uapi/asm/fcntl.h +3
-3@@ -1,5 +1,5 @@ -#ifndef _ARM_FCNTL_H -#define _ARM_FCNTL_H +#ifndef _UAPI_ARM_FCNTL_H +#define _UAPI_ARM_FCNTL_H#define O_DIRECTORY 040000/* must be a directory */ #define O_NOFOLLOW 0100000/* don't follow links */ @@ -8,4 +8,4 @@#include <asm-generic/fcntl.h> -#endif +#endif /* _UAPI_ARM_FCNTL_H */ arch/arm/include/uapi/asm/ioctls.h +3
-3@@ -1,8 +1,8 @@ -#ifndef __ASM_ARM_IOCTLS_H -#define __ASM_ARM_IOCTLS_H +#ifndef _UAPI__ASM_ARM_IOCTLS_H +#define _UAPI__ASM_ARM_IOCTLS_H#define FIOQSIZE 0x545E#include <asm-generic/ioctls.h> -#endif +#endif /* _UAPI__ASM_ARM_IOCTLS_H */ arch/arm/include/uapi/asm/kvm.h +4
-4@@ -13,11 +13,11 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software -* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +* Foundation (the address is in a copy of the GPL). */ -#ifndef __ARM_KVM_H__ -#define __ARM_KVM_H__ +#ifndef _UAPI__ARM_KVM_H__ +#define _UAPI__ARM_KVM_H__#include <linux/types.h> #include <asm/ptrace.h> @@ -178,4 +178,4 @@ struct kvm_arch_memory_slot {#define KVM_PSCI_RET_INVAL ((unsigned long)-2)#define KVM_PSCI_RET_DENIED ((unsigned long)-3) -#endif /* __ARM_KVM_H__ */ +#endif /* _UAPI__ARM_KVM_H__ */ arch/arm/include/uapi/asm/kvm_para.h deleted +0
-1@@ -1 +0,0 @@ -#include <asm-generic/kvm_para.h> arch/arm/include/uapi/asm/mman.h +5
-0@@ -1,4 +1,9 @@ +#ifndef _UAPI_ARM_MMAN_H +#define _UAPI_ARM_MMAN_H +#include <asm-generic/mman.h> #define arch_mmap_check (addr, len, flags) \ (((flags) & MAP_FIXED && (addr) < FIRST_USER_ADDRESS) ? -EINVAL : 0) + +#endif /* _UAPI_ARM_MMAN_H */ arch/arm/include/uapi/asm/perf_regs.h +4
-3@@ -1,5 +1,5 @@ -#ifndef _ASM_ARM_PERF_REGS_H -#define _ASM_ARM_PERF_REGS_H +#ifndef _UAPI_ASM_ARM_PERF_REGS_H +#define _UAPI_ASM_ARM_PERF_REGS_Henum perf_event_arm_regs { PERF_REG_ARM_R0,@@ -20,4 +20,5 @@ enum perf_event_arm_regs {PERF_REG_ARM_PC , PERF_REG_ARM_MAX, }; -#endif /* _ASM_ARM_PERF_REGS_H */ + +#endif /* _UAPI_ASM_ARM_PERF_REGS_H */ arch/arm/include/uapi/asm/posix_types.h +3
-3@@ -10,8 +10,8 @@* Changelog: * 27-06-1996 RMK Created */ -#ifndef __ARCH_ARM_POSIX_TYPES_H -#define __ARCH_ARM_POSIX_TYPES_H +#ifndef _UAPI__ARCH_ARM_POSIX_TYPES_H +#define _UAPI__ARCH_ARM_POSIX_TYPES_H/* * This file is generally used by user-level software, so you need to @@ -34,4 +34,4 @@ typedef unsigned short __kernel_old_dev_t;#include <asm-generic/posix_types.h> -#endif +#endif /* _UAPI__ARCH_ARM_POSIX_TYPES_H */ arch/arm/include/uapi/asm/ptrace.h +0
-1@@ -151,7 +151,6 @@ struct pt_regs {*/ #define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ ) -#endif /* __ASSEMBLY__ */ #endif /* _UAPI__ASM_ARM_PTRACE_H */ arch/arm/include/uapi/asm/setup.h +0
-1@@ -183,5 +183,4 @@ struct tagtable {#define for_each_tag (t,base) \ for (t = base; t->hdr.size; t = tag_next(t)) -#endif /* _UAPI__ASMARM_SETUP_H */ arch/arm/include/uapi/asm/sigcontext.h +3
-4@@ -1,5 +1,5 @@ -#ifndef _ASMARM_SIGCONTEXT_H -#define _ASMARM_SIGCONTEXT_H +#ifndef _UAPI_ASMARM_SIGCONTEXT_H +#define _UAPI_ASMARM_SIGCONTEXT_H/* * Signal context structure - contains all info to do with the state @@ -30,5 +30,4 @@ struct sigcontext { unsigned long fault_address; }; - -#endif +#endif /* _UAPI_ASMARM_SIGCONTEXT_H */ arch/arm/include/uapi/asm/signal.h +0
-1@@ -116,5 +116,4 @@ typedef struct sigaltstack { size_t ss_size; } stack_t; -#endif /* _UAPI_ASMARM_SIGNAL_H */ arch/arm/include/uapi/asm/stat.h +3
-3@@ -1,5 +1,5 @@ -#ifndef _ASMARM_STAT_H -#define _ASMARM_STAT_H +#ifndef _UAPI_ASMARM_STAT_H +#define _UAPI_ASMARM_STAT_H struct __old_kernel_stat { unsigned short st_dev;@@ -84,4 +84,4 @@ struct stat64 { unsigned long long st_ino; }; -#endif +#endif /* _UAPI_ASMARM_STAT_H */ arch/arm/include/uapi/asm/statfs.h +4
-3@@ -1,5 +1,5 @@ -#ifndef _ASMARM_STATFS_H -#define _ASMARM_STATFS_H +#ifndef _UAPI_ASMARM_STATFS_H +#define _UAPI_ASMARM_STATFS_H/* * With EABI there is 4 bytes of padding added to this structure. @@ -9,4 +9,5 @@#define ARCH_PACK_STATFS64 __attribute__((packed,aligned(4)))#include <asm-generic/statfs.h> -#endif + +#endif /* _UAPI_ASMARM_STATFS_H */ Signature · 1 line
1.7.7.6
Signature · 1 line
Christoffer
Quoted 11 lines · Christoffer Dall
Quoted 10 lines · Chen Gang
For all uapi headers, need use "
_UAPI" prefix for its guard macro (which will be stripped by "scripts/headers_installer.sh").Additional completions:
- be sure that all "endif" need be appended related comment, also it has and only has one empty line above and no any lines below either.
- be sure that all normal uapi header files need content guard macro.
Quoted 8 lines
Quoted 5 lines
- remove the default "
kvm_para.h" and add 'generic-y' inKbuild.- remove the detail address of Free Software Foundation (or can not pass "
scripts/checkpatch.pl").for the kvm/arm part I guess it looks fine.
OK, thanks.
Quoted 275 lines
-Christoffer
Quoted 272 lines
Signed-off-by Chen Gang <[email protected]>--- arch/arm/include/uapi/asm/Kbuild | 3 ++- arch/arm/include/uapi/asm/byteorder.h | 7 +++---- arch/arm/include/uapi/asm/fcntl.h | 6 +++--- arch/arm/include/uapi/asm/ioctls.h | 6 +++--- arch/arm/include/uapi/asm/kvm.h | 8 ++++---- arch/arm/include/uapi/asm/kvm_para.h | 1 - arch/arm/include/uapi/asm/mman.h | 5 +++++ arch/arm/include/uapi/asm/perf_regs.h | 7 ++++--- arch/arm/include/uapi/asm/posix_types.h | 6 +++--- arch/arm/include/uapi/asm/ptrace.h | 1 - arch/arm/include/uapi/asm/setup.h | 1 - arch/arm/include/uapi/asm/sigcontext.h | 7 +++---- arch/arm/include/uapi/asm/signal.h | 1 - arch/arm/include/uapi/asm/stat.h | 6 +++--- arch/arm/include/uapi/asm/statfs.h | 7 ++++--- 15 files changed, 37 insertions(+), 35 deletions(-) delete mode 100644 arch/arm/include/uapi/asm/kvm_para.harch/arm/include/uapi/asm/Kbuild +2
-1@@ -1,11 +1,12 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm +generic-y += kvm_para.h + header-y += byteorder.h header-y += fcntl.h header-y += hwcap.h header-y += ioctls.h -header-y += kvm_para.h header-y += mman.h header-y += perf_regs.h header-y += posix_types.harch/arm/include/uapi/asm/byteorder.h +3
-4@@ -12,8 +12,8 @@* and word accesses (data or instruction) appear as: * d0...d31 */ -#ifndef __ASM_ARM_BYTEORDER_H -#define __ASM_ARM_BYTEORDER_H +#ifndef _UAPI__ASM_ARM_BYTEORDER_H +#define _UAPI__ASM_ARM_BYTEORDER_H#ifdef __ARMEB__#include <linux/byteorder/big_endian.h> @@ -21,5 +21,4 @@#include <linux/byteorder/little_endian.h> #endif -#endif - +#endif /* _UAPI__ASM_ARM_BYTEORDER_H */ arch/arm/include/uapi/asm/fcntl.h +3
-3@@ -1,5 +1,5 @@ -#ifndef _ARM_FCNTL_H -#define _ARM_FCNTL_H +#ifndef _UAPI_ARM_FCNTL_H +#define _UAPI_ARM_FCNTL_H#define O_DIRECTORY 040000/* must be a directory */ #define O_NOFOLLOW 0100000/* don't follow links */ @@ -8,4 +8,4 @@#include <asm-generic/fcntl.h> -#endif +#endif /* _UAPI_ARM_FCNTL_H */ arch/arm/include/uapi/asm/ioctls.h +3
-3@@ -1,8 +1,8 @@ -#ifndef __ASM_ARM_IOCTLS_H -#define __ASM_ARM_IOCTLS_H +#ifndef _UAPI__ASM_ARM_IOCTLS_H +#define _UAPI__ASM_ARM_IOCTLS_H#define FIOQSIZE 0x545E#include <asm-generic/ioctls.h> -#endif +#endif /* _UAPI__ASM_ARM_IOCTLS_H */ arch/arm/include/uapi/asm/kvm.h +4
-4@@ -13,11 +13,11 @@* * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software -* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +* Foundation (the address is in a copy of the GPL). */ -#ifndef __ARM_KVM_H__ -#define __ARM_KVM_H__ +#ifndef _UAPI__ARM_KVM_H__ +#define _UAPI__ARM_KVM_H__#include <linux/types.h> #include <asm/ptrace.h> @@ -178,4 +178,4 @@ struct kvm_arch_memory_slot {#define KVM_PSCI_RET_INVAL ((unsigned long)-2)#define KVM_PSCI_RET_DENIED ((unsigned long)-3) -#endif /* __ARM_KVM_H__ */ +#endif /* _UAPI__ARM_KVM_H__ */ arch/arm/include/uapi/asm/kvm_para.h deleted +0
-1@@ -1 +0,0 @@ -#include <asm-generic/kvm_para.h> arch/arm/include/uapi/asm/mman.h +5
-0@@ -1,4 +1,9 @@ +#ifndef _UAPI_ARM_MMAN_H +#define _UAPI_ARM_MMAN_H +#include <asm-generic/mman.h> #define arch_mmap_check (addr, len, flags) \ (((flags) & MAP_FIXED && (addr) < FIRST_USER_ADDRESS) ? -EINVAL : 0) + +#endif /* _UAPI_ARM_MMAN_H */ arch/arm/include/uapi/asm/perf_regs.h +4
-3@@ -1,5 +1,5 @@ -#ifndef _ASM_ARM_PERF_REGS_H -#define _ASM_ARM_PERF_REGS_H +#ifndef _UAPI_ASM_ARM_PERF_REGS_H +#define _UAPI_ASM_ARM_PERF_REGS_Henum perf_event_arm_regs { PERF_REG_ARM_R0,@@ -20,4 +20,5 @@ enum perf_event_arm_regs {PERF_REG_ARM_PC , PERF_REG_ARM_MAX, }; -#endif /* _ASM_ARM_PERF_REGS_H */ + +#endif /* _UAPI_ASM_ARM_PERF_REGS_H */ arch/arm/include/uapi/asm/posix_types.h +3
-3@@ -10,8 +10,8 @@* Changelog: * 27-06-1996 RMK Created */ -#ifndef __ARCH_ARM_POSIX_TYPES_H -#define __ARCH_ARM_POSIX_TYPES_H +#ifndef _UAPI__ARCH_ARM_POSIX_TYPES_H +#define _UAPI__ARCH_ARM_POSIX_TYPES_H/* * This file is generally used by user-level software, so you need to @@ -34,4 +34,4 @@ typedef unsigned short __kernel_old_dev_t;#include <asm-generic/posix_types.h> -#endif +#endif /* _UAPI__ARCH_ARM_POSIX_TYPES_H */ arch/arm/include/uapi/asm/ptrace.h +0
-1@@ -151,7 +151,6 @@ struct pt_regs {*/ #define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ ) -#endif /* __ASSEMBLY__ */ #endif /* _UAPI__ASM_ARM_PTRACE_H */ arch/arm/include/uapi/asm/setup.h +0
-1@@ -183,5 +183,4 @@ struct tagtable {#define for_each_tag (t,base) \ for (t = base; t->hdr.size; t = tag_next(t)) -#endif /* _UAPI__ASMARM_SETUP_H */ arch/arm/include/uapi/asm/sigcontext.h +3
-4@@ -1,5 +1,5 @@ -#ifndef _ASMARM_SIGCONTEXT_H -#define _ASMARM_SIGCONTEXT_H +#ifndef _UAPI_ASMARM_SIGCONTEXT_H +#define _UAPI_ASMARM_SIGCONTEXT_H/* * Signal context structure - contains all info to do with the state @@ -30,5 +30,4 @@ struct sigcontext { unsigned long fault_address; }; - -#endif +#endif /* _UAPI_ASMARM_SIGCONTEXT_H */ arch/arm/include/uapi/asm/signal.h +0
-1@@ -116,5 +116,4 @@ typedef struct sigaltstack { size_t ss_size; } stack_t; -#endif /* _UAPI_ASMARM_SIGNAL_H */ arch/arm/include/uapi/asm/stat.h +3
-3@@ -1,5 +1,5 @@ -#ifndef _ASMARM_STAT_H -#define _ASMARM_STAT_H +#ifndef _UAPI_ASMARM_STAT_H +#define _UAPI_ASMARM_STAT_H struct __old_kernel_stat { unsigned short st_dev;@@ -84,4 +84,4 @@ struct stat64 { unsigned long long st_ino; }; -#endif +#endif /* _UAPI_ASMARM_STAT_H */ arch/arm/include/uapi/asm/statfs.h +4
-3@@ -1,5 +1,5 @@ -#ifndef _ASMARM_STATFS_H -#define _ASMARM_STATFS_H +#ifndef _UAPI_ASMARM_STATFS_H +#define _UAPI_ASMARM_STATFS_H/* * With EABI there is 4 bytes of padding added to this structure. @@ -9,4 +9,5 @@#define ARCH_PACK_STATFS64 __attribute__((packed,aligned(4)))#include <asm-generic/statfs.h> -#endif + +#endif /* _UAPI_ASMARM_STATFS_H */ Signature · 1 line
1.7.7.6
Signature · 1 line
Chen Gang