include/asm-x86/percpu.h: checkpatch cleanups - formatting only
authorJoe Perches <joe@perches.com>
Sun, 23 Mar 2008 08:03:06 +0000 (01:03 -0700)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:41:26 +0000 (17:41 +0200)
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/asm-x86/percpu.h

index 0dec00f27eb45db5a853cfa621a2513d1b860953..736fc3bb8e1eaa1f8280ed471c70c6deffe20512 100644 (file)
@@ -85,58 +85,62 @@ DECLARE_PER_CPU(unsigned long, this_cpu_off);
  * don't give an lvalue though). */
 extern void __bad_percpu_size(void);
 
-#define percpu_to_op(op,var,val)                               \
-       do {                                                    \
-               typedef typeof(var) T__;                        \
-               if (0) { T__ tmp__; tmp__ = (val); }            \
-               switch (sizeof(var)) {                          \
-               case 1:                                         \
-                       asm(op "b %1,"__percpu_seg"%0"          \
-                           : "+m" (var)                        \
-                           :"ri" ((T__)val));                  \
-                       break;                                  \
-               case 2:                                         \
-                       asm(op "w %1,"__percpu_seg"%0"          \
-                           : "+m" (var)                        \
-                           :"ri" ((T__)val));                  \
-                       break;                                  \
-               case 4:                                         \
-                       asm(op "l %1,"__percpu_seg"%0"          \
-                           : "+m" (var)                        \
-                           :"ri" ((T__)val));                  \
-                       break;                                  \
-               default: __bad_percpu_size();                   \
-               }                                               \
-       } while (0)
-
-#define percpu_from_op(op,var)                                 \
-       ({                                                      \
-               typeof(var) ret__;                              \
-               switch (sizeof(var)) {                          \
-               case 1:                                         \
-                       asm(op "b "__percpu_seg"%1,%0"          \
-                           : "=r" (ret__)                      \
-                           : "m" (var));                       \
-                       break;                                  \
-               case 2:                                         \
-                       asm(op "w "__percpu_seg"%1,%0"          \
-                           : "=r" (ret__)                      \
-                           : "m" (var));                       \
-                       break;                                  \
-               case 4:                                         \
-                       asm(op "l "__percpu_seg"%1,%0"          \
-                           : "=r" (ret__)                      \
-                           : "m" (var));                       \
-                       break;                                  \
-               default: __bad_percpu_size();                   \
-               }                                               \
-               ret__; })
+#define percpu_to_op(op, var, val)                     \
+do {                                                   \
+       typedef typeof(var) T__;                        \
+       if (0) {                                        \
+               T__ tmp__;                              \
+               tmp__ = (val);                          \
+       }                                               \
+       switch (sizeof(var)) {                          \
+       case 1:                                         \
+               asm(op "b %1,"__percpu_seg"%0"          \
+                   : "+m" (var)                        \
+                   : "ri" ((T__)val));                 \
+               break;                                  \
+       case 2:                                         \
+               asm(op "w %1,"__percpu_seg"%0"          \
+                   : "+m" (var)                        \
+                   : "ri" ((T__)val));                 \
+               break;                                  \
+       case 4:                                         \
+               asm(op "l %1,"__percpu_seg"%0"          \
+                   : "+m" (var)                        \
+                   : "ri" ((T__)val));                 \
+               break;                                  \
+       default: __bad_percpu_size();                   \
+       }                                               \
+} while (0)
+
+#define percpu_from_op(op, var)                                \
+({                                                     \
+       typeof(var) ret__;                              \
+       switch (sizeof(var)) {                          \
+       case 1:                                         \
+               asm(op "b "__percpu_seg"%1,%0"          \
+                   : "=r" (ret__)                      \
+                   : "m" (var));                       \
+               break;                                  \
+       case 2:                                         \
+               asm(op "w "__percpu_seg"%1,%0"          \
+                   : "=r" (ret__)                      \
+                   : "m" (var));                       \
+               break;                                  \
+       case 4:                                         \
+               asm(op "l "__percpu_seg"%1,%0"          \
+                   : "=r" (ret__)                      \
+                   : "m" (var));                       \
+               break;                                  \
+       default: __bad_percpu_size();                   \
+       }                                               \
+       ret__;                                          \
+})
 
 #define x86_read_percpu(var) percpu_from_op("mov", per_cpu__##var)
-#define x86_write_percpu(var,val) percpu_to_op("mov", per_cpu__##var, val)
-#define x86_add_percpu(var,val) percpu_to_op("add", per_cpu__##var, val)
-#define x86_sub_percpu(var,val) percpu_to_op("sub", per_cpu__##var, val)
-#define x86_or_percpu(var,val) percpu_to_op("or", per_cpu__##var, val)
+#define x86_write_percpu(var, val) percpu_to_op("mov", per_cpu__##var, val)
+#define x86_add_percpu(var, val) percpu_to_op("add", per_cpu__##var, val)
+#define x86_sub_percpu(var, val) percpu_to_op("sub", per_cpu__##var, val)
+#define x86_or_percpu(var, val) percpu_to_op("or", per_cpu__##var, val)
 #endif /* !__ASSEMBLY__ */
 #endif /* !CONFIG_X86_64 */
 #endif /* _ASM_X86_PERCPU_H_ */