diff options
author | Jan Engelhardt <jengelh@computergmbh.de> | 2008-01-30 07:33:23 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:23 -0500 |
commit | ade1af77129dea6e335b525ed3be3b846bc1ec13 (patch) | |
tree | 0fee8803a8145ef9935212c31df59bb339a78811 /arch/x86/kernel/microcode.c | |
parent | d729ab35ee1367b7690458ae9e050571cb055bd3 (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/kernel/microcode.c')
-rw-r--r-- | arch/x86/kernel/microcode.c | 12 |
1 files changed, 5 insertions, 7 deletions
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) { |