[PATCH 8/20] UML - Style fixes in arch/um/sys-x86_64
Style fixes in arch/um/sys-x86_64: updated copyrights CodingStyle fixes added severities to printks which needed them A bunch of functions in sys-*/ptrace_user.c turn out to be unused, so they and their declarations are gone. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> --- arch/um/include/ptrace_user.h | 11 ++-- arch/um/sys-i386/ptrace_user.c | 14 --- arch/um/sys-x86_64/bug.c |3 +- arch/um/sys-x86_64/ptrace.c| 29 --- arch/um/sys-x86_64/ptrace_user.c | 46 - arch/um/sys-x86_64/syscall_table.c | 31 arch/um/sys-x86_64/sysrq.c | 29 --- arch/um/sys-x86_64/um_module.c |8 -- 8 files changed, 65 insertions(+), 106 deletions(-) Index: linux-2.6.22/arch/um/include/ptrace_user.h === --- linux-2.6.22.orig/arch/um/include/ptrace_user.h 2007-12-14 11:28:07.0 -0500 +++ linux-2.6.22/arch/um/include/ptrace_user.h 2007-12-14 11:47:57.0 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000, 2001, 2002 Jeff Dike ([EMAIL PROTECTED]) + * Copyright (C) 2000 - 2007 Jeff Dike ([EMAIL PROTECTED],linux.intel}.com) * Licensed under the GPL */ @@ -10,12 +10,6 @@ extern int ptrace_getregs(long pid, unsigned long *regs_out); extern int ptrace_setregs(long pid, unsigned long *regs_in); -extern int ptrace_getfpregs(long pid, unsigned long *regs_out); -extern int ptrace_setfpregs(long pid, unsigned long *regs); -extern void arch_enter_kernel(void *task, int pid); -extern void arch_leave_kernel(void *task, int pid); -extern void ptrace_pokeuser(unsigned long addr, unsigned long data); - /* syscall emulation path in ptrace */ @@ -54,7 +48,8 @@ extern int sysemu_supported; (((int[3][3] ) { \ { PTRACE_SYSCALL, PTRACE_SYSCALL, PTRACE_SINGLESTEP }, \ { PTRACE_SYSEMU, PTRACE_SYSEMU, PTRACE_SINGLESTEP }, \ - { PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP, PTRACE_SYSEMU_SINGLESTEP }}) \ + { PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP, \ + PTRACE_SYSEMU_SINGLESTEP } }) \ [sysemu_mode][singlestep_mode]) #endif Index: linux-2.6.22/arch/um/sys-i386/ptrace_user.c === --- linux-2.6.22.orig/arch/um/sys-i386/ptrace_user.c2007-12-14 11:28:07.0 -0500 +++ linux-2.6.22/arch/um/sys-i386/ptrace_user.c 2007-12-14 11:38:28.0 -0500 @@ -19,17 +19,3 @@ int ptrace_setregs(long pid, unsigned lo return -errno; return 0; } - -int ptrace_getfpregs(long pid, unsigned long *regs) -{ - if (ptrace(PTRACE_GETFPREGS, pid, 0, regs) < 0) - return -errno; - return 0; -} - -int ptrace_setfpregs(long pid, unsigned long *regs) -{ - if (ptrace(PTRACE_SETFPREGS, pid, 0, regs) < 0) - return -errno; - return 0; -} Index: linux-2.6.22/arch/um/sys-x86_64/bug.c === --- linux-2.6.22.orig/arch/um/sys-x86_64/bug.c 2007-12-14 11:28:07.0 -0500 +++ linux-2.6.22/arch/um/sys-x86_64/bug.c 2007-12-14 11:38:28.0 -0500 @@ -5,7 +5,8 @@ #include -/* Mostly copied from i386/x86_86 - eliminated the eip < PAGE_OFFSET because +/* + * Mostly copied from i386/x86_86 - eliminated the eip < PAGE_OFFSET because * that's not relevant in skas mode. */ Index: linux-2.6.22/arch/um/sys-x86_64/ptrace.c === --- linux-2.6.22.orig/arch/um/sys-x86_64/ptrace.c 2007-12-14 11:28:07.0 -0500 +++ linux-2.6.22/arch/um/sys-x86_64/ptrace.c2007-12-14 11:47:21.0 -0500 @@ -5,13 +5,12 @@ * Licensed under the GPL */ -#define __FRAME_OFFSETS -#include +#include #include #include -#include +#define __FRAME_OFFSETS +#include #include -#include /* * determines which flags the user has access to. @@ -24,12 +23,14 @@ int putreg(struct task_struct *child, in unsigned long tmp; #ifdef TIF_IA32 - /* Some code in the 64bit emulation may not be 64bit clean. - Don't take any chances. */ + /* +* Some code in the 64bit emulation may not be 64bit clean. +* Don't take any chances. +*/ if (test_tsk_thread_flag(child, TIF_IA32)) value &= 0x; #endif - switch (regno){ + switch (regno) { case FS: case GS: case DS: @@ -66,7 +67,7 @@ int poke_user(struct task_struct *child, if (addr < MAX_REG_OFFSET) return putreg(child, addr, data); else if ((addr >= offsetof(struct user, u_debugreg[0])) && - (addr <= offsetof(struct user, u_debugreg[7]))){ + (addr <= offsetof(struct user, u_debugreg[7]))) {
[PATCH 8/20] UML - Style fixes in arch/um/sys-x86_64
Style fixes in arch/um/sys-x86_64: updated copyrights CodingStyle fixes added severities to printks which needed them A bunch of functions in sys-*/ptrace_user.c turn out to be unused, so they and their declarations are gone. Signed-off-by: Jeff Dike [EMAIL PROTECTED] --- arch/um/include/ptrace_user.h | 11 ++-- arch/um/sys-i386/ptrace_user.c | 14 --- arch/um/sys-x86_64/bug.c |3 +- arch/um/sys-x86_64/ptrace.c| 29 --- arch/um/sys-x86_64/ptrace_user.c | 46 - arch/um/sys-x86_64/syscall_table.c | 31 arch/um/sys-x86_64/sysrq.c | 29 --- arch/um/sys-x86_64/um_module.c |8 -- 8 files changed, 65 insertions(+), 106 deletions(-) Index: linux-2.6.22/arch/um/include/ptrace_user.h === --- linux-2.6.22.orig/arch/um/include/ptrace_user.h 2007-12-14 11:28:07.0 -0500 +++ linux-2.6.22/arch/um/include/ptrace_user.h 2007-12-14 11:47:57.0 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000, 2001, 2002 Jeff Dike ([EMAIL PROTECTED]) + * Copyright (C) 2000 - 2007 Jeff Dike ([EMAIL PROTECTED],linux.intel}.com) * Licensed under the GPL */ @@ -10,12 +10,6 @@ extern int ptrace_getregs(long pid, unsigned long *regs_out); extern int ptrace_setregs(long pid, unsigned long *regs_in); -extern int ptrace_getfpregs(long pid, unsigned long *regs_out); -extern int ptrace_setfpregs(long pid, unsigned long *regs); -extern void arch_enter_kernel(void *task, int pid); -extern void arch_leave_kernel(void *task, int pid); -extern void ptrace_pokeuser(unsigned long addr, unsigned long data); - /* syscall emulation path in ptrace */ @@ -54,7 +48,8 @@ extern int sysemu_supported; (((int[3][3] ) { \ { PTRACE_SYSCALL, PTRACE_SYSCALL, PTRACE_SINGLESTEP }, \ { PTRACE_SYSEMU, PTRACE_SYSEMU, PTRACE_SINGLESTEP }, \ - { PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP, PTRACE_SYSEMU_SINGLESTEP }}) \ + { PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP, \ + PTRACE_SYSEMU_SINGLESTEP } }) \ [sysemu_mode][singlestep_mode]) #endif Index: linux-2.6.22/arch/um/sys-i386/ptrace_user.c === --- linux-2.6.22.orig/arch/um/sys-i386/ptrace_user.c2007-12-14 11:28:07.0 -0500 +++ linux-2.6.22/arch/um/sys-i386/ptrace_user.c 2007-12-14 11:38:28.0 -0500 @@ -19,17 +19,3 @@ int ptrace_setregs(long pid, unsigned lo return -errno; return 0; } - -int ptrace_getfpregs(long pid, unsigned long *regs) -{ - if (ptrace(PTRACE_GETFPREGS, pid, 0, regs) 0) - return -errno; - return 0; -} - -int ptrace_setfpregs(long pid, unsigned long *regs) -{ - if (ptrace(PTRACE_SETFPREGS, pid, 0, regs) 0) - return -errno; - return 0; -} Index: linux-2.6.22/arch/um/sys-x86_64/bug.c === --- linux-2.6.22.orig/arch/um/sys-x86_64/bug.c 2007-12-14 11:28:07.0 -0500 +++ linux-2.6.22/arch/um/sys-x86_64/bug.c 2007-12-14 11:38:28.0 -0500 @@ -5,7 +5,8 @@ #include linux/uaccess.h -/* Mostly copied from i386/x86_86 - eliminated the eip PAGE_OFFSET because +/* + * Mostly copied from i386/x86_86 - eliminated the eip PAGE_OFFSET because * that's not relevant in skas mode. */ Index: linux-2.6.22/arch/um/sys-x86_64/ptrace.c === --- linux-2.6.22.orig/arch/um/sys-x86_64/ptrace.c 2007-12-14 11:28:07.0 -0500 +++ linux-2.6.22/arch/um/sys-x86_64/ptrace.c2007-12-14 11:47:21.0 -0500 @@ -5,13 +5,12 @@ * Licensed under the GPL */ -#define __FRAME_OFFSETS -#include asm/ptrace.h +#include linux/mm.h #include linux/sched.h #include linux/errno.h -#include linux/mm.h +#define __FRAME_OFFSETS +#include asm/ptrace.h #include asm/uaccess.h -#include asm/elf.h /* * determines which flags the user has access to. @@ -24,12 +23,14 @@ int putreg(struct task_struct *child, in unsigned long tmp; #ifdef TIF_IA32 - /* Some code in the 64bit emulation may not be 64bit clean. - Don't take any chances. */ + /* +* Some code in the 64bit emulation may not be 64bit clean. +* Don't take any chances. +*/ if (test_tsk_thread_flag(child, TIF_IA32)) value = 0x; #endif - switch (regno){ + switch (regno) { case FS: case GS: case DS: @@ -66,7 +67,7 @@ int poke_user(struct task_struct *child, if (addr MAX_REG_OFFSET) return putreg(child, addr, data); else if ((addr = offsetof(struct user, u_debugreg[0])) - (addr = offsetof(struct user,