aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/traps_32.c
diff options
context:
space:
mode:
authorAlexander van Heukelum <heukelum@mailshack.com>2008-07-01 19:33:14 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-09 02:18:31 -0400
commit7b4fd4bb2e7fad2c41afab4683a44ab77f6f35d0 (patch)
tree09eda64368c825c550cf7eb032a34f98976b547f /arch/x86/kernel/traps_32.c
parentabd348072798aa88d48fe9f182ac3440fcb7ae47 (diff)
x86: traps_xx: various small changes
- order of local variable declarations - minor code changes Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Acked-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/traps_32.c')
-rw-r--r--arch/x86/kernel/traps_32.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c
index fb8e3cce7bfb..8a768973c4f0 100644
--- a/arch/x86/kernel/traps_32.c
+++ b/arch/x86/kernel/traps_32.c
@@ -106,13 +106,13 @@ static int die_counter;
106void printk_address(unsigned long address, int reliable) 106void printk_address(unsigned long address, int reliable)
107{ 107{
108#ifdef CONFIG_KALLSYMS 108#ifdef CONFIG_KALLSYMS
109 char namebuf[KSYM_NAME_LEN];
110 unsigned long offset = 0; 109 unsigned long offset = 0;
111 unsigned long symsize; 110 unsigned long symsize;
112 const char *symname; 111 const char *symname;
113 char reliab[4] = "";
114 char *delim = ":";
115 char *modname; 112 char *modname;
113 char *delim = ":";
114 char namebuf[KSYM_NAME_LEN];
115 char reliab[4] = "";
116 116
117 symname = kallsyms_lookup(address, &symsize, &offset, 117 symname = kallsyms_lookup(address, &symsize, &offset,
118 &modname, namebuf); 118 &modname, namebuf);
@@ -135,8 +135,8 @@ void printk_address(unsigned long address, int reliable)
135static inline int valid_stack_ptr(struct thread_info *tinfo, 135static inline int valid_stack_ptr(struct thread_info *tinfo,
136 void *p, unsigned int size) 136 void *p, unsigned int size)
137{ 137{
138 return p > (void *)tinfo && 138 void *t = tinfo;
139 p <= (void *)tinfo + THREAD_SIZE - size; 139 return p > t && p <= t + THREAD_SIZE - size;
140} 140}
141 141
142/* The form of the top of the frame on the stack */ 142/* The form of the top of the frame on the stack */
@@ -976,9 +976,8 @@ clear_TF_reenable:
976void math_error(void __user *ip) 976void math_error(void __user *ip)
977{ 977{
978 struct task_struct *task; 978 struct task_struct *task;
979 unsigned short cwd;
980 unsigned short swd;
981 siginfo_t info; 979 siginfo_t info;
980 unsigned short cwd, swd;
982 981
983 /* 982 /*
984 * Save the info for the exception handler and clear the error. 983 * Save the info for the exception handler and clear the error.
@@ -1042,8 +1041,8 @@ void do_coprocessor_error(struct pt_regs *regs, long error_code)
1042static void simd_math_error(void __user *ip) 1041static void simd_math_error(void __user *ip)
1043{ 1042{
1044 struct task_struct *task; 1043 struct task_struct *task;
1045 unsigned short mxcsr;
1046 siginfo_t info; 1044 siginfo_t info;
1045 unsigned short mxcsr;
1047 1046
1048 /* 1047 /*
1049 * Save the info for the exception handler and clear the error. 1048 * Save the info for the exception handler and clear the error.