diff options
author | Jeff Dike <jdike@addtoit.com> | 2008-02-08 12:22:08 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 17:22:42 (GMT) |
commit | 5134d8fea06ab51459fd095d091d1e6f73a44553 (patch) | |
tree | 504a84a9290a40f0c98b7c5731b7df82cb357ebe /arch/um/os-Linux/sys-x86_64 | |
parent | 536788fe2d28e11db6aeda74207d95d750fb761f (diff) | |
download | linux-fsl-qoriq-5134d8fea06ab51459fd095d091d1e6f73a44553.tar.xz |
uml: style fixes in arch/um/os-Linux
Style changes under arch/um/os-Linux:
include trimming
CodingStyle fixes
some printks needed severity indicators
make_tempfile turns out not to be used outside of mem.c, so it is now static.
Its declaration in tempfile.h is no longer needed, and tempfile.h itself is no
longer needed.
create_tmp_file was also made static.
checkpatch moans about an EXPORT_SYMBOL in user_syms.c which is part of a
macro definition - this is copying a bit of kernel infrastructure into the
libc side of UML because the kernel headers can't be included there.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/os-Linux/sys-x86_64')
-rw-r--r-- | arch/um/os-Linux/sys-x86_64/registers.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/arch/um/os-Linux/sys-x86_64/registers.c b/arch/um/os-Linux/sys-x86_64/registers.c index 9bfa789..a375853 100644 --- a/arch/um/os-Linux/sys-x86_64/registers.c +++ b/arch/um/os-Linux/sys-x86_64/registers.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) + * Copyright (C) 2006 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Licensed under the GPL */ @@ -7,31 +7,36 @@ #include <sys/ptrace.h> #define __FRAME_OFFSETS #include <asm/ptrace.h> +#include "kern_constants.h" #include "longjmp.h" #include "user.h" int save_fp_registers(int pid, unsigned long *fp_regs) { - if(ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0) + if (ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0) return -errno; return 0; } int restore_fp_registers(int pid, unsigned long *fp_regs) { - if(ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0) + if (ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0) return -errno; return 0; } unsigned long get_thread_reg(int reg, jmp_buf *buf) { - switch(reg){ - case RIP: return buf[0]->__rip; - case RSP: return buf[0]->__rsp; - case RBP: return buf[0]->__rbp; + switch (reg) { + case RIP: + return buf[0]->__rip; + case RSP: + return buf[0]->__rsp; + case RBP: + return buf[0]->__rbp; default: - printk("get_thread_regs - unknown register %d\n", reg); + printk(UM_KERN_ERR "get_thread_regs - unknown register %d\n", + reg); return 0; } } |