Skip to contentSkip to conversation

make cond_syscall look right

PATCH New Matt Mackall 1 participant 1 message Mar 8, 2005 ABI/API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 make cond_syscall look right

The current cond_syscall #defines add a semicolon on the end, and then folks leave the semicolons off in kernel/sys_ni.c, which confuses editors that are language-aware and is just generally bad style. This sweeps all the users and makes sys_ni.c look like normal C code.

include/asm-ppc/unistd.h +1 -1
Index: nosys/include/asm-ppc/unistd.h
===================================================================
@@ -468,7 +468,7 @@ long sys_rt_sigaction(int sig,
  * but it doesn't work on all toolchains, so we just do it by hand
  */
 #ifndef cond_syscall
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 #endif
 
 #endif /* __KERNEL__ */
include/asm-sparc64/unistd.h +1 -1
Index: nosys/include/asm-sparc64/unistd.h
===================================================================
@@ -509,6 +509,6 @@ asmlinkage long sys_rt_sigaction(int sig
  * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  * but it doesn't work on all toolchains, so we just do it by hand
  */
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 
 #endif /* _SPARC64_UNISTD_H */
kernel/sys_ni.c +69 -69

143 lines not on this page · raw message

include/asm-sh/unistd.h +1 -1
Index: nosys/include/asm-sh/unistd.h
===================================================================
@@ -517,7 +517,7 @@ asmlinkage long sys_rt_sigaction(int sig
  * but it doesn't work on all toolchains, so we just do it by hand
  */
 #ifndef cond_syscall
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 #endif
 
 #endif /* __ASM_SH_UNISTD_H */
include/asm-m68k/unistd.h +1 -1
Index: nosys/include/asm-m68k/unistd.h
===================================================================
@@ -460,6 +460,6 @@ asmlinkage long sys_rt_sigaction(int sig
  * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  * but it doesn't work on all toolchains, so we just do it by hand
  */
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 
 #endif /* _ASM_M68K_UNISTD_H_ */
include/asm-frv/unistd.h +1 -1
Index: nosys/include/asm-frv/unistd.h
===================================================================
@@ -495,7 +495,7 @@ static inline pid_t wait(int * wait_stat
  * but it doesn't work on all toolchains, so we just do it by hand
  */
 #ifndef cond_syscall
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 #endif
 
 #endif /* _ASM_UNISTD_H_ */
include/asm-sh64/unistd.h +1 -1
Index: nosys/include/asm-sh64/unistd.h
===================================================================
@@ -549,7 +549,7 @@ static inline pid_t wait(int * wait_stat
  * but it doesn't work on all toolchains, so we just do it by hand
  */
 #ifndef cond_syscall
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 #endif
 
 #endif /* __ASM_SH64_UNISTD_H */
include/asm-m68knommu/unistd.h +1 -1
Index: nosys/include/asm-m68knommu/unistd.h
===================================================================
@@ -524,6 +524,6 @@ asmlinkage long sys_rt_sigaction(int sig
  * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  * but it doesn't work on all toolchains, so we just do it by hand
  */
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 
 #endif /* _ASM_M68K_UNISTD_H_ */
include/asm-i386/unistd.h +1 -1
Index: nosys/include/asm-i386/unistd.h
===================================================================
@@ -460,7 +460,7 @@ asmlinkage long sys_rt_sigaction(int sig
  * but it doesn't work on all toolchains, so we just do it by hand
  */
 #ifndef cond_syscall
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 #endif
 
 #endif /* _ASM_I386_UNISTD_H_ */
include/asm/unistd.h +1 -1
Index: nosys/include/asm/unistd.h
===================================================================
@@ -460,7 +460,7 @@ asmlinkage long sys_rt_sigaction(int sig
  * but it doesn't work on all toolchains, so we just do it by hand
  */
 #ifndef cond_syscall
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 #endif
 
 #endif /* _ASM_I386_UNISTD_H_ */
include/asm-ppc64/unistd.h +1 -1
Index: nosys/include/asm-ppc64/unistd.h
===================================================================
@@ -472,7 +472,7 @@ long sys_rt_sigaction(int sig, const str
  * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  * but it doesn't work on all toolchains, so we just do it by hand
  */
-#define cond_syscall(x) asm(".weak\t." #x "\n\t.set\t." #x ",.sys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t." #x "\n\t.set\t." #x ",.sys_ni_syscall")
 
 #endif		/* __KERNEL__ */
 
include/asm-mips/unistd.h +1 -1
Index: nosys/include/asm-mips/unistd.h
===================================================================
@@ -1180,6 +1180,6 @@ asmlinkage long sys_rt_sigaction(int sig
  * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  * but it doesn't work on all toolchains, so we just do it by hand
  */
-#define cond_syscall(x) asm(".weak\t" #x "\n" #x "\t=\tsys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t" #x "\n" #x "\t=\tsys_ni_syscall")
 
 #endif /* _ASM_UNISTD_H */
include/asm-x86_64/unistd.h +1 -1
Index: nosys/include/asm-x86_64/unistd.h
===================================================================
@@ -792,6 +792,6 @@ asmlinkage long sys_rt_sigaction(int sig
  * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  * but it doesn't work on all toolchains, so we just do it by hand
  */
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 
 #endif
include/asm-sparc/unistd.h +1 -1
Index: nosys/include/asm-sparc/unistd.h
===================================================================
@@ -513,6 +513,6 @@ asmlinkage long sys_rt_sigaction(int sig
  * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  * but it doesn't work on all toolchains, so we just do it by hand
  */
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 
 #endif /* _SPARC_UNISTD_H */
include/asm-m32r/unistd.h +1 -1
Index: nosys/include/asm-m32r/unistd.h
===================================================================
@@ -468,7 +468,7 @@ asmlinkage long sys_rt_sigaction(int sig
  * but it doesn't work on all toolchains, so we just do it by hand
  */
 #ifndef cond_syscall
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 #endif
 
 #endif /* _ASM_M32R_UNISTD_H */
include/asm-parisc/unistd.h +1 -1
Index: nosys/include/asm-parisc/unistd.h
===================================================================
@@ -1024,6 +1024,6 @@ asmlinkage long sys_rt_sigaction(int sig
  * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  * but it doesn't work on all toolchains, so we just do it by hand
  */
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 
 #endif /* _ASM_PARISC_UNISTD_H_ */
include/asm-ia64/unistd.h +1 -1
Index: nosys/include/asm-ia64/unistd.h
===================================================================
@@ -392,7 +392,7 @@ asmlinkage long sys_rt_sigaction(int sig
  * proper prototype, but we can't use __typeof__ either, because not all cond_syscall()
  * declarations have prototypes at the moment.
  */
-#define cond_syscall(x) asmlinkage long x (void) __attribute__((weak,alias("sys_ni_syscall")));
+#define cond_syscall(x) asmlinkage long x (void) __attribute__((weak,alias("sys_ni_syscall")))
 
 #endif /* !__ASSEMBLY__ */
 #endif /* __KERNEL__ */
include/asm-cris/unistd.h +1 -1
Index: nosys/include/asm-cris/unistd.h
===================================================================
@@ -387,6 +387,6 @@ extern inline _syscall3(pid_t,waitpid,pi
  * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  * but it doesn't work on all toolchains, so we just do it by hand
  */
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 
 #endif /* _ASM_CRIS_UNISTD_H_ */
include/asm-arm26/unistd.h +1 -1
Index: nosys/include/asm-arm26/unistd.h
===================================================================
@@ -495,6 +495,6 @@ asmlinkage long sys_rt_sigaction(int sig
  * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  * but it doesn't work on all toolchains, so we just do it by hand
  */
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 
 #endif /* __ASM_ARM_UNISTD_H */
include/asm-alpha/unistd.h +1 -1
Index: nosys/include/asm-alpha/unistd.h
===================================================================
@@ -651,6 +651,6 @@ asmlinkage long sys_rt_sigaction(int sig
    have declarations.  If we use no prototype, then we get warnings from
    -Wstrict-prototypes.  Ho hum.  */
 
-#define cond_syscall(x)  asm(".weak\t" #x "\n" #x " = sys_ni_syscall");
+#define cond_syscall(x)  asm(".weak\t" #x "\n" #x " = sys_ni_syscall")
 
 #endif /* _ALPHA_UNISTD_H */
include/asm-v850/unistd.h +1 -1
Index: nosys/include/asm-v850/unistd.h
===================================================================
@@ -466,7 +466,7 @@ asmlinkage long sys_rt_sigaction(int sig
  */
 #define cond_syscall(name)						      \
   asm (".weak\t" C_SYMBOL_STRING(name) ";"				      \
-       ".set\t" C_SYMBOL_STRING(name) "," C_SYMBOL_STRING(sys_ni_syscall));
+       ".set\t" C_SYMBOL_STRING(name) "," C_SYMBOL_STRING(sys_ni_syscall))
 #if 0
 /* This doesn't work if there's a function prototype for NAME visible,
    because the argument types probably won't match.  */
include/asm-arm/unistd.h +1 -1
Index: nosys/include/asm-arm/unistd.h
===================================================================
@@ -509,6 +509,6 @@ asmlinkage long sys_rt_sigaction(int sig
  * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  * but it doesn't work on all toolchains, so we just do it by hand
  */
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 
 #endif /* __ASM_ARM_UNISTD_H */
include/asm-s390/unistd.h +1 -1
Index: nosys/include/asm-s390/unistd.h
===================================================================
@@ -597,6 +597,6 @@ asmlinkage long sys_rt_sigaction(int sig
  * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  * but it doesn't work on all toolchains, so we just do it by hand
  */
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
 
 #endif /* _ASM_S390_UNISTD_H_ */
Signature · 1 line
Mathematics is the supreme nostalgia of our time.