aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-26 04:52:33 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 04:52:33 -0400
commitdd2994f619752fb731f21c89ad16536dd6673948 (patch)
treef56447ea8c2a54a8eb74ea8a9a5f802f8afe76d4
parent131cfd7bd54767ec8959e013f83839442a54d546 (diff)
[PATCH] Add sparse annotations to quiet sparse in arch/x86_64/mm/fault.c
Fixes linux/arch/x86_64/mm/fault.c:125:7: warning: incorrect type in argument 1 (different address spaces) linux/arch/x86_64/mm/fault.c:125:7: expected void [noderef] *<noident><asn:1> linux/arch/x86_64/mm/fault.c:125:7: got unsigned char *[assigned] instr linux/arch/x86_64/mm/fault.c:163:8: warning: incorrect type in argument 1 (different address spaces) linux/arch/x86_64/mm/fault.c:163:8: expected void [noderef] *<noident><asn:1> linux/arch/x86_64/mm/fault.c:163:8: got unsigned char *[assigned] instr linux/arch/x86_64/mm/fault.c:179:9: warning: incorrect type in argument 1 (different address spaces) linux/arch/x86_64/mm/fault.c:179:9: expected void [noderef] *<noident><asn:1> linux/arch/x86_64/mm/fault.c:179:9: got unsigned long *<noident> Signed-off-by: Andi Kleen <ak@suse.de>
-rw-r--r--arch/x86_64/mm/fault.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c
index ac8ea66ccb94..449a437f5d70 100644
--- a/arch/x86_64/mm/fault.c
+++ b/arch/x86_64/mm/fault.c
@@ -102,7 +102,7 @@ void bust_spinlocks(int yes)
102static noinline int is_prefetch(struct pt_regs *regs, unsigned long addr, 102static noinline int is_prefetch(struct pt_regs *regs, unsigned long addr,
103 unsigned long error_code) 103 unsigned long error_code)
104{ 104{
105 unsigned char *instr; 105 unsigned char __user *instr;
106 int scan_more = 1; 106 int scan_more = 1;
107 int prefetch = 0; 107 int prefetch = 0;
108 unsigned char *max_instr; 108 unsigned char *max_instr;
@@ -111,7 +111,7 @@ static noinline int is_prefetch(struct pt_regs *regs, unsigned long addr,
111 if (error_code & PF_INSTR) 111 if (error_code & PF_INSTR)
112 return 0; 112 return 0;
113 113
114 instr = (unsigned char *)convert_rip_to_linear(current, regs); 114 instr = (unsigned char __user *)convert_rip_to_linear(current, regs);
115 max_instr = instr + 15; 115 max_instr = instr + 15;
116 116
117 if (user_mode(regs) && instr >= (unsigned char *)TASK_SIZE) 117 if (user_mode(regs) && instr >= (unsigned char *)TASK_SIZE)
@@ -122,7 +122,7 @@ static noinline int is_prefetch(struct pt_regs *regs, unsigned long addr,
122 unsigned char instr_hi; 122 unsigned char instr_hi;
123 unsigned char instr_lo; 123 unsigned char instr_lo;
124 124
125 if (__get_user(opcode, instr)) 125 if (__get_user(opcode, (char __user *)instr))
126 break; 126 break;
127 127
128 instr_hi = opcode & 0xf0; 128 instr_hi = opcode & 0xf0;
@@ -160,7 +160,7 @@ static noinline int is_prefetch(struct pt_regs *regs, unsigned long addr,
160 case 0x00: 160 case 0x00:
161 /* Prefetch instruction is 0x0F0D or 0x0F18 */ 161 /* Prefetch instruction is 0x0F0D or 0x0F18 */
162 scan_more = 0; 162 scan_more = 0;
163 if (__get_user(opcode, instr)) 163 if (__get_user(opcode, (char __user *)instr))
164 break; 164 break;
165 prefetch = (instr_lo == 0xF) && 165 prefetch = (instr_lo == 0xF) &&
166 (opcode == 0x0D || opcode == 0x18); 166 (opcode == 0x0D || opcode == 0x18);
@@ -176,7 +176,7 @@ static noinline int is_prefetch(struct pt_regs *regs, unsigned long addr,
176static int bad_address(void *p) 176static int bad_address(void *p)
177{ 177{
178 unsigned long dummy; 178 unsigned long dummy;
179 return __get_user(dummy, (unsigned long *)p); 179 return __get_user(dummy, (unsigned long __user *)p);
180} 180}
181 181
182void dump_pagetable(unsigned long address) 182void dump_pagetable(unsigned long address)