Re: [PATCH] arch: arm: uapi: be sure of "_UAPI" prefix for all guard macros

2013-11-13 Thread Chen Gang
On 11/08/2013 11:47 AM, Chen Gang wrote:
> 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.

Oh, sorry, it should use 'generic-y' instead of 'header-y' in Kbuild. I
will send patch v2 for it.

> 
>  - remove the detail address of Free Software Foundation (or can not
>pass "scripts/checkpatch.pl").
> 

Thanks.
-- 
Chen Gang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] arch: arm: uapi: be sure of _UAPI prefix for all guard macros

2013-11-13 Thread Chen Gang
On 11/08/2013 11:47 AM, Chen Gang wrote:
 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.

Oh, sorry, it should use 'generic-y' instead of 'header-y' in Kbuild. I
will send patch v2 for it.

 
  - remove the detail address of Free Software Foundation (or can not
pass scripts/checkpatch.pl).
 

Thanks.
-- 
Chen Gang
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] arch: arm: uapi: be sure of "_UAPI" prefix for all guard macros

2013-11-07 Thread 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 in Kbuild.

 - remove the detail address of Free Software Foundation (or can not
   pass "scripts/checkpatch.pl").


Cc: David Howells 
Signed-off-by: Chen Gang 
---
 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

diff --git a/arch/arm/include/uapi/asm/byteorder.h 
b/arch/arm/include/uapi/asm/byteorder.h
index 7737974..ffd1e93 100644
--- a/arch/arm/include/uapi/asm/byteorder.h
+++ b/arch/arm/include/uapi/asm/byteorder.h
@@ -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 
@@ -21,5 +21,4 @@
 #include 
 #endif
 
-#endif
-
+#endif /* _UAPI__ASM_ARM_BYTEORDER_H */
diff --git a/arch/arm/include/uapi/asm/fcntl.h 
b/arch/arm/include/uapi/asm/fcntl.h
index a80b660..4cde9c4 100644
--- a/arch/arm/include/uapi/asm/fcntl.h
+++ b/arch/arm/include/uapi/asm/fcntl.h
@@ -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 04 /* must be a directory */
 #define O_NOFOLLOW 010 /* don't follow links */
@@ -8,4 +8,4 @@
 
 #include 
 
-#endif
+#endif /* _UAPI_ARM_FCNTL_H */
diff --git a/arch/arm/include/uapi/asm/ioctls.h 
b/arch/arm/include/uapi/asm/ioctls.h
index 9c96298..a9d8008 100644
--- a/arch/arm/include/uapi/asm/ioctls.h
+++ b/arch/arm/include/uapi/asm/ioctls.h
@@ -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 
 
-#endif
+#endif /* _UAPI__ASM_ARM_IOCTLS_H */
diff --git a/arch/arm/include/uapi/asm/kvm.h b/arch/arm/include/uapi/asm/kvm.h
index c498b60..f44fad1 100644
--- a/arch/arm/include/uapi/asm/kvm.h
+++ b/arch/arm/include/uapi/asm/kvm.h
@@ -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 
 #include 
@@ -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__ */
diff --git a/arch/arm/include/uapi/asm/kvm_para.h 
b/arch/arm/include/uapi/asm/kvm_para.h
deleted file mode 100644
index 14fab8f..000
--- a/arch/arm/include/uapi/asm/kvm_para.h
+++ /dev/null
@@ -1 +0,0 @@
-#include 
diff --git a/arch/arm/include/uapi/asm/mman.h b/arch/arm/include/uapi/asm/mman.h
index 41f99c5..bf6ac7c 100644
--- a/arch/arm/include/uapi/asm/mman.h
+++ b/arch/arm/include/uapi/asm/mman.h
@@ -1,4 +1,9 @@
+#ifndef _UAPI_ARM_MMAN_H
+#define _UAPI_ARM_MMAN_H
+
 #include 
 
 #define arch_mmap_check(addr, len, flags) \
(((flags) & MAP_FIXED && (addr) < FIRST_USER_ADDRESS) ? -EINVAL : 0)
+
+#endif /* _UAPI_ARM_MMAN_H */
diff --git a/arch/arm/include/uapi/asm/perf_regs.h 
b/arch/arm/include/uapi/asm/perf_regs.h
index ce59448..61e86fb 100644
--- a/arch/arm/include/uapi/asm/perf_regs.h
+++ b/arch/arm/include/uapi/asm/perf_regs.h
@@ -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_H
 
 enum 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 /* 

[PATCH] arch: arm: uapi: be sure of _UAPI prefix for all guard macros

2013-11-07 Thread 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 in Kbuild.

 - remove the detail address of Free Software Foundation (or can not
   pass scripts/checkpatch.pl).


Cc: David Howells dhowe...@redhat.com
Signed-off-by: Chen Gang gang.c...@asianux.com
---
 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

diff --git a/arch/arm/include/uapi/asm/byteorder.h 
b/arch/arm/include/uapi/asm/byteorder.h
index 7737974..ffd1e93 100644
--- a/arch/arm/include/uapi/asm/byteorder.h
+++ b/arch/arm/include/uapi/asm/byteorder.h
@@ -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 */
diff --git a/arch/arm/include/uapi/asm/fcntl.h 
b/arch/arm/include/uapi/asm/fcntl.h
index a80b660..4cde9c4 100644
--- a/arch/arm/include/uapi/asm/fcntl.h
+++ b/arch/arm/include/uapi/asm/fcntl.h
@@ -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 04 /* must be a directory */
 #define O_NOFOLLOW 010 /* don't follow links */
@@ -8,4 +8,4 @@
 
 #include asm-generic/fcntl.h
 
-#endif
+#endif /* _UAPI_ARM_FCNTL_H */
diff --git a/arch/arm/include/uapi/asm/ioctls.h 
b/arch/arm/include/uapi/asm/ioctls.h
index 9c96298..a9d8008 100644
--- a/arch/arm/include/uapi/asm/ioctls.h
+++ b/arch/arm/include/uapi/asm/ioctls.h
@@ -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 */
diff --git a/arch/arm/include/uapi/asm/kvm.h b/arch/arm/include/uapi/asm/kvm.h
index c498b60..f44fad1 100644
--- a/arch/arm/include/uapi/asm/kvm.h
+++ b/arch/arm/include/uapi/asm/kvm.h
@@ -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__ */
diff --git a/arch/arm/include/uapi/asm/kvm_para.h 
b/arch/arm/include/uapi/asm/kvm_para.h
deleted file mode 100644
index 14fab8f..000
--- a/arch/arm/include/uapi/asm/kvm_para.h
+++ /dev/null
@@ -1 +0,0 @@
-#include asm-generic/kvm_para.h
diff --git a/arch/arm/include/uapi/asm/mman.h b/arch/arm/include/uapi/asm/mman.h
index 41f99c5..bf6ac7c 100644
--- a/arch/arm/include/uapi/asm/mman.h
+++ b/arch/arm/include/uapi/asm/mman.h
@@ -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 */
diff --git a/arch/arm/include/uapi/asm/perf_regs.h 
b/arch/arm/include/uapi/asm/perf_regs.h
index ce59448..61e86fb 100644
--- a/arch/arm/include/uapi/asm/perf_regs.h
+++ b/arch/arm/include/uapi/asm/perf_regs.h
@@ -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_H
 
 enum perf_event_arm_regs {