aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@computergmbh.de>2008-01-30 07:33:23 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:33:23 -0500
commitade1af77129dea6e335b525ed3be3b846bc1ec13 (patch)
tree0fee8803a8145ef9935212c31df59bb339a78811 /arch/x86
parentd729ab35ee1367b7690458ae9e050571cb055bd3 (diff)
x86: remove unneded casts
x86: remove unneeded casts Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/boot/compressed/misc_32.c5
-rw-r--r--arch/x86/boot/compressed/misc_64.c5
-rw-r--r--arch/x86/ia32/ia32_signal.c2
-rw-r--r--arch/x86/kernel/cpu/cpufreq/longhaul.c2
-rw-r--r--arch/x86/kernel/cpuid.c2
-rw-r--r--arch/x86/kernel/kprobes.c2
-rw-r--r--arch/x86/kernel/microcode.c12
-rw-r--r--arch/x86/kernel/process_64.c2
-rw-r--r--arch/x86/kernel/signal_32.c2
-rw-r--r--arch/x86/kernel/smpboot_32.c2
-rw-r--r--arch/x86/kernel/stacktrace.c2
-rw-r--r--arch/x86/kernel/traps_64.c2
-rw-r--r--arch/x86/lib/memcpy_32.c4
-rw-r--r--arch/x86/lib/memmove_64.c4
14 files changed, 24 insertions, 24 deletions
diff --git a/arch/x86/boot/compressed/misc_32.c b/arch/x86/boot/compressed/misc_32.c
index 9103652058c4..5a0281c81edf 100644
--- a/arch/x86/boot/compressed/misc_32.c
+++ b/arch/x86/boot/compressed/misc_32.c
@@ -285,7 +285,7 @@ static void putstr(const char *s)
285static void* memset(void* s, int c, unsigned n) 285static void* memset(void* s, int c, unsigned n)
286{ 286{
287 int i; 287 int i;
288 char *ss = (char*)s; 288 char *ss = s;
289 289
290 for (i=0;i<n;i++) ss[i] = c; 290 for (i=0;i<n;i++) ss[i] = c;
291 return s; 291 return s;
@@ -294,7 +294,8 @@ static void* memset(void* s, int c, unsigned n)
294static void* memcpy(void* dest, const void* src, unsigned n) 294static void* memcpy(void* dest, const void* src, unsigned n)
295{ 295{
296 int i; 296 int i;
297 char *d = (char *)dest, *s = (char *)src; 297 const char *s = src;
298 char *d = dest;
298 299
299 for (i=0;i<n;i++) d[i] = s[i]; 300 for (i=0;i<n;i++) d[i] = s[i];
300 return dest; 301 return dest;
diff --git a/arch/x86/boot/compressed/misc_64.c b/arch/x86/boot/compressed/misc_64.c
index 8494f0dcff21..8c1573b5d6c7 100644
--- a/arch/x86/boot/compressed/misc_64.c
+++ b/arch/x86/boot/compressed/misc_64.c
@@ -284,7 +284,7 @@ static void putstr(const char *s)
284static void* memset(void* s, int c, unsigned n) 284static void* memset(void* s, int c, unsigned n)
285{ 285{
286 int i; 286 int i;
287 char *ss = (char*)s; 287 char *ss = s;
288 288
289 for (i=0;i<n;i++) ss[i] = c; 289 for (i=0;i<n;i++) ss[i] = c;
290 return s; 290 return s;
@@ -293,7 +293,8 @@ static void* memset(void* s, int c, unsigned n)
293static void* memcpy(void* dest, const void* src, unsigned n) 293static void* memcpy(void* dest, const void* src, unsigned n)
294{ 294{
295 int i; 295 int i;
296 char *d = (char *)dest, *s = (char *)src; 296 const char *s = src;
297 char *d = dest;
297 298
298 for (i=0;i<n;i++) d[i] = s[i]; 299 for (i=0;i<n;i++) d[i] = s[i];
299 return dest; 300 return dest;
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c
index 0a34c24f19e5..1c0503bdfb1a 100644
--- a/arch/x86/ia32/ia32_signal.c
+++ b/arch/x86/ia32/ia32_signal.c
@@ -472,7 +472,7 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka,
472 restorer = VDSO32_SYMBOL(current->mm->context.vdso, 472 restorer = VDSO32_SYMBOL(current->mm->context.vdso,
473 sigreturn); 473 sigreturn);
474 else 474 else
475 restorer = (void *)&frame->retcode; 475 restorer = &frame->retcode;
476 } 476 }
477 err |= __put_user(ptr_to_compat(restorer), &frame->pretcode); 477 err |= __put_user(ptr_to_compat(restorer), &frame->pretcode);
478 478
diff --git a/arch/x86/kernel/cpu/cpufreq/longhaul.c b/arch/x86/kernel/cpu/cpufreq/longhaul.c
index 749d00cb2ebd..06fcce516d51 100644
--- a/arch/x86/kernel/cpu/cpufreq/longhaul.c
+++ b/arch/x86/kernel/cpu/cpufreq/longhaul.c
@@ -694,7 +694,7 @@ static acpi_status longhaul_walk_callback(acpi_handle obj_handle,
694 if ( acpi_bus_get_device(obj_handle, &d) ) { 694 if ( acpi_bus_get_device(obj_handle, &d) ) {
695 return 0; 695 return 0;
696 } 696 }
697 *return_value = (void *)acpi_driver_data(d); 697 *return_value = acpi_driver_data(d);
698 return 1; 698 return 1;
699} 699}
700 700
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c
index d387c770c518..dec66e452810 100644
--- a/arch/x86/kernel/cpuid.c
+++ b/arch/x86/kernel/cpuid.c
@@ -50,7 +50,7 @@ struct cpuid_command {
50 50
51static void cpuid_smp_cpuid(void *cmd_block) 51static void cpuid_smp_cpuid(void *cmd_block)
52{ 52{
53 struct cpuid_command *cmd = (struct cpuid_command *)cmd_block; 53 struct cpuid_command *cmd = cmd_block;
54 54
55 cpuid(cmd->reg, &cmd->data[0], &cmd->data[1], &cmd->data[2], 55 cpuid(cmd->reg, &cmd->data[0], &cmd->data[1], &cmd->data[2],
56 &cmd->data[3]); 56 &cmd->data[3]);
diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c
index f7ddbb8c3fe8..a99e764fd66a 100644
--- a/arch/x86/kernel/kprobes.c
+++ b/arch/x86/kernel/kprobes.c
@@ -953,7 +953,7 @@ int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr)
953int __kprobes kprobe_exceptions_notify(struct notifier_block *self, 953int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
954 unsigned long val, void *data) 954 unsigned long val, void *data)
955{ 955{
956 struct die_args *args = (struct die_args *)data; 956 struct die_args *args = data;
957 int ret = NOTIFY_DONE; 957 int ret = NOTIFY_DONE;
958 958
959 if (args->regs && user_mode_vm(args->regs)) 959 if (args->regs && user_mode_vm(args->regs))
diff --git a/arch/x86/kernel/microcode.c b/arch/x86/kernel/microcode.c
index 40cfd5488719..6ff447f9fda7 100644
--- a/arch/x86/kernel/microcode.c
+++ b/arch/x86/kernel/microcode.c
@@ -244,8 +244,8 @@ static int microcode_sanity_check(void *mc)
244 return 0; 244 return 0;
245 /* check extended signature checksum */ 245 /* check extended signature checksum */
246 for (i = 0; i < ext_sigcount; i++) { 246 for (i = 0; i < ext_sigcount; i++) {
247 ext_sig = (struct extended_signature *)((void *)ext_header 247 ext_sig = (void *)ext_header + EXT_HEADER_SIZE +
248 + EXT_HEADER_SIZE + EXT_SIGNATURE_SIZE * i); 248 EXT_SIGNATURE_SIZE * i;
249 sum = orig_sum 249 sum = orig_sum
250 - (mc_header->sig + mc_header->pf + mc_header->cksum) 250 - (mc_header->sig + mc_header->pf + mc_header->cksum)
251 + (ext_sig->sig + ext_sig->pf + ext_sig->cksum); 251 + (ext_sig->sig + ext_sig->pf + ext_sig->cksum);
@@ -279,11 +279,9 @@ static int get_maching_microcode(void *mc, int cpu)
279 if (total_size <= get_datasize(mc_header) + MC_HEADER_SIZE) 279 if (total_size <= get_datasize(mc_header) + MC_HEADER_SIZE)
280 return 0; 280 return 0;
281 281
282 ext_header = (struct extended_sigtable *)(mc + 282 ext_header = mc + get_datasize(mc_header) + MC_HEADER_SIZE;
283 get_datasize(mc_header) + MC_HEADER_SIZE);
284 ext_sigcount = ext_header->count; 283 ext_sigcount = ext_header->count;
285 ext_sig = (struct extended_signature *)((void *)ext_header 284 ext_sig = (void *)ext_header + EXT_HEADER_SIZE;
286 + EXT_HEADER_SIZE);
287 for (i = 0; i < ext_sigcount; i++) { 285 for (i = 0; i < ext_sigcount; i++) {
288 if (microcode_update_match(cpu, mc_header, 286 if (microcode_update_match(cpu, mc_header,
289 ext_sig->sig, ext_sig->pf)) 287 ext_sig->sig, ext_sig->pf))
@@ -539,7 +537,7 @@ static int cpu_request_microcode(int cpu)
539 pr_debug("ucode data file %s load failed\n", name); 537 pr_debug("ucode data file %s load failed\n", name);
540 return error; 538 return error;
541 } 539 }
542 buf = (void *)firmware->data; 540 buf = firmware->data;
543 size = firmware->size; 541 size = firmware->size;
544 while ((offset = get_next_ucode_from_buffer(&mc, buf, size, offset)) 542 while ((offset = get_next_ucode_from_buffer(&mc, buf, size, offset))
545 > 0) { 543 > 0) {
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 95313532b2e0..b4c470658a8a 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -470,7 +470,7 @@ static inline void set_32bit_tls(struct task_struct *t, int tls, u32 addr)
470 .limit_in_pages = 1, 470 .limit_in_pages = 1,
471 .useable = 1, 471 .useable = 1,
472 }; 472 };
473 struct desc_struct *desc = (void *)t->thread.tls_array; 473 struct desc_struct *desc = t->thread.tls_array;
474 desc += tls; 474 desc += tls;
475 fill_ldt(desc, &ud); 475 fill_ldt(desc, &ud);
476} 476}
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c
index 89a690edf999..caee1f002fed 100644
--- a/arch/x86/kernel/signal_32.c
+++ b/arch/x86/kernel/signal_32.c
@@ -368,7 +368,7 @@ static int setup_frame(int sig, struct k_sigaction *ka,
368 if (current->binfmt->hasvdso) 368 if (current->binfmt->hasvdso)
369 restorer = VDSO32_SYMBOL(current->mm->context.vdso, sigreturn); 369 restorer = VDSO32_SYMBOL(current->mm->context.vdso, sigreturn);
370 else 370 else
371 restorer = (void *)&frame->retcode; 371 restorer = &frame->retcode;
372 if (ka->sa.sa_flags & SA_RESTORER) 372 if (ka->sa.sa_flags & SA_RESTORER)
373 restorer = ka->sa.sa_restorer; 373 restorer = ka->sa.sa_restorer;
374 374
diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c
index 915ec6267326..7a62dced61ca 100644
--- a/arch/x86/kernel/smpboot_32.c
+++ b/arch/x86/kernel/smpboot_32.c
@@ -132,7 +132,7 @@ static unsigned long __cpuinit setup_trampoline(void)
132 */ 132 */
133void __init smp_alloc_memory(void) 133void __init smp_alloc_memory(void)
134{ 134{
135 trampoline_base = (void *) alloc_bootmem_low_pages(PAGE_SIZE); 135 trampoline_base = alloc_bootmem_low_pages(PAGE_SIZE);
136 /* 136 /*
137 * Has to be in very low memory so we can execute 137 * Has to be in very low memory so we can execute
138 * real-mode AP code. 138 * real-mode AP code.
diff --git a/arch/x86/kernel/stacktrace.c b/arch/x86/kernel/stacktrace.c
index 4f4021b5bfb5..02f0f61f5b11 100644
--- a/arch/x86/kernel/stacktrace.c
+++ b/arch/x86/kernel/stacktrace.c
@@ -24,7 +24,7 @@ static int save_stack_stack(void *data, char *name)
24 24
25static void save_stack_address(void *data, unsigned long addr, int reliable) 25static void save_stack_address(void *data, unsigned long addr, int reliable)
26{ 26{
27 struct stack_trace *trace = (struct stack_trace *)data; 27 struct stack_trace *trace = data;
28 if (trace->skip > 0) { 28 if (trace->skip > 0) {
29 trace->skip--; 29 trace->skip--;
30 return; 30 return;
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c
index 911ed28afff8..4aa4520f9499 100644
--- a/arch/x86/kernel/traps_64.c
+++ b/arch/x86/kernel/traps_64.c
@@ -217,7 +217,7 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,
217static inline int valid_stack_ptr(struct thread_info *tinfo, 217static inline int valid_stack_ptr(struct thread_info *tinfo,
218 void *p, unsigned int size, void *end) 218 void *p, unsigned int size, void *end)
219{ 219{
220 void *t = (void *)tinfo; 220 void *t = tinfo;
221 if (end) { 221 if (end) {
222 if (p < end && p >= (end-THREAD_SIZE)) 222 if (p < end && p >= (end-THREAD_SIZE))
223 return 1; 223 return 1;
diff --git a/arch/x86/lib/memcpy_32.c b/arch/x86/lib/memcpy_32.c
index 8ac51b82a632..37756b6fb329 100644
--- a/arch/x86/lib/memcpy_32.c
+++ b/arch/x86/lib/memcpy_32.c
@@ -34,8 +34,8 @@ void *memmove(void *dest, const void *src, size_t n)
34 "cld" 34 "cld"
35 : "=&c" (d0), "=&S" (d1), "=&D" (d2) 35 : "=&c" (d0), "=&S" (d1), "=&D" (d2)
36 :"0" (n), 36 :"0" (n),
37 "1" (n-1+(const char *)src), 37 "1" (n-1+src),
38 "2" (n-1+(char *)dest) 38 "2" (n-1+dest)
39 :"memory"); 39 :"memory");
40 } 40 }
41 return dest; 41 return dest;
diff --git a/arch/x86/lib/memmove_64.c b/arch/x86/lib/memmove_64.c
index 751ebae8ec42..80175e47b190 100644
--- a/arch/x86/lib/memmove_64.c
+++ b/arch/x86/lib/memmove_64.c
@@ -11,8 +11,8 @@ void *memmove(void * dest,const void *src,size_t count)
11 if (dest < src) { 11 if (dest < src) {
12 return memcpy(dest,src,count); 12 return memcpy(dest,src,count);
13 } else { 13 } else {
14 char *p = (char *) dest + count; 14 char *p = dest + count;
15 char *s = (char *) src + count; 15 const char *s = src + count;
16 while (count--) 16 while (count--)
17 *--p = *--s; 17 *--p = *--s;
18 } 18 }