score: cleanups: dead code, 0 as pointer, shadowed variables
A few smaller issues found by sparse, some code that was
never used, two instances of '0' instead of 'NULL' and
local variables shadowing another one.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
diff --git a/arch/score/kernel/sys_score.c b/arch/score/kernel/sys_score.c
index 5b3cc4e..61aff8a 100644
--- a/arch/score/kernel/sys_score.c
+++ b/arch/score/kernel/sys_score.c
@@ -31,10 +31,7 @@
#include <linux/syscalls.h>
#include <asm/syscalls.h>
-unsigned long shm_align_mask = PAGE_SIZE - 1;
-EXPORT_SYMBOL(shm_align_mask);
-
-asmlinkage unsigned
+asmlinkage long
sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
unsigned long flags, unsigned long fd, unsigned long pgoff)
{
@@ -107,15 +104,6 @@
}
/*
- * If we ever come here the user sp is bad. Zap the process right away.
- * Due to the bad stack signaling wouldn't work.
- */
-void bad_stack(void)
-{
- do_exit(SIGSEGV);
-}
-
-/*
* Do a system call from kernel instead of calling sys_execve so we
* end up with proper pt_regs.
*/