diff options
author | Andreas Herrmann <andreas.herrmann3@amd.com> | 2008-12-16 13:11:23 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-16 13:58:02 -0500 |
commit | be957763b01905d33b53cdd25c8df110f94f499a (patch) | |
tree | e3efbfd786de8a6ddf09191a4c335e4591df3693 /arch/x86/kernel/microcode_amd.c | |
parent | 2a3282a77b02fb47576ffbdb4867c8c6eeb83ed5 (diff) |
x86: microcode_amd: fix checkpatch warnings/errors
Impact: cleanup
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/microcode_amd.c')
-rw-r--r-- | arch/x86/kernel/microcode_amd.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c index 83a9fa321d9b..a8a0ec600554 100644 --- a/arch/x86/kernel/microcode_amd.c +++ b/arch/x86/kernel/microcode_amd.c | |||
@@ -32,9 +32,9 @@ | |||
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
34 | #include <linux/pci_ids.h> | 34 | #include <linux/pci_ids.h> |
35 | #include <linux/uaccess.h> | ||
35 | 36 | ||
36 | #include <asm/msr.h> | 37 | #include <asm/msr.h> |
37 | #include <asm/uaccess.h> | ||
38 | #include <asm/processor.h> | 38 | #include <asm/processor.h> |
39 | #include <asm/microcode.h> | 39 | #include <asm/microcode.h> |
40 | 40 | ||
@@ -225,7 +225,7 @@ static void apply_microcode_amd(int cpu) | |||
225 | uci->cpu_sig.rev = rev; | 225 | uci->cpu_sig.rev = rev; |
226 | } | 226 | } |
227 | 227 | ||
228 | static void * get_next_ucode(u8 *buf, unsigned int size, | 228 | static void *get_next_ucode(u8 *buf, unsigned int size, |
229 | int (*get_ucode_data)(void *, const void *, size_t), | 229 | int (*get_ucode_data)(void *, const void *, size_t), |
230 | unsigned int *mc_size) | 230 | unsigned int *mc_size) |
231 | { | 231 | { |
@@ -256,7 +256,8 @@ static void * get_next_ucode(u8 *buf, unsigned int size, | |||
256 | mc = vmalloc(UCODE_MAX_SIZE); | 256 | mc = vmalloc(UCODE_MAX_SIZE); |
257 | if (mc) { | 257 | if (mc) { |
258 | memset(mc, 0, UCODE_MAX_SIZE); | 258 | memset(mc, 0, UCODE_MAX_SIZE); |
259 | if (get_ucode_data(mc, buf + UCODE_CONTAINER_SECTION_HDR, total_size)) { | 259 | if (get_ucode_data(mc, buf + UCODE_CONTAINER_SECTION_HDR, |
260 | total_size)) { | ||
260 | vfree(mc); | 261 | vfree(mc); |
261 | mc = NULL; | 262 | mc = NULL; |
262 | } else | 263 | } else |
@@ -332,7 +333,8 @@ static int generic_load_microcode(int cpu, void *data, size_t size, | |||
332 | unsigned int uninitialized_var(mc_size); | 333 | unsigned int uninitialized_var(mc_size); |
333 | struct microcode_header_amd *mc_header; | 334 | struct microcode_header_amd *mc_header; |
334 | 335 | ||
335 | mc = get_next_ucode(ucode_ptr, leftover, get_ucode_data, &mc_size); | 336 | mc = get_next_ucode(ucode_ptr, leftover, get_ucode_data, |
337 | &mc_size); | ||
336 | if (!mc) | 338 | if (!mc) |
337 | break; | 339 | break; |
338 | 340 | ||
@@ -342,7 +344,7 @@ static int generic_load_microcode(int cpu, void *data, size_t size, | |||
342 | vfree(new_mc); | 344 | vfree(new_mc); |
343 | new_rev = mc_header->patch_id; | 345 | new_rev = mc_header->patch_id; |
344 | new_mc = mc; | 346 | new_mc = mc; |
345 | } else | 347 | } else |
346 | vfree(mc); | 348 | vfree(mc); |
347 | 349 | ||
348 | ucode_ptr += mc_size; | 350 | ucode_ptr += mc_size; |
@@ -354,9 +356,9 @@ static int generic_load_microcode(int cpu, void *data, size_t size, | |||
354 | if (uci->mc) | 356 | if (uci->mc) |
355 | vfree(uci->mc); | 357 | vfree(uci->mc); |
356 | uci->mc = new_mc; | 358 | uci->mc = new_mc; |
357 | pr_debug("microcode: CPU%d found a matching microcode update with" | 359 | pr_debug("microcode: CPU%d found a matching microcode " |
358 | " version 0x%x (current=0x%x)\n", | 360 | "update with version 0x%x (current=0x%x)\n", |
359 | cpu, new_rev, uci->cpu_sig.rev); | 361 | cpu, new_rev, uci->cpu_sig.rev); |
360 | } else | 362 | } else |
361 | vfree(new_mc); | 363 | vfree(new_mc); |
362 | } | 364 | } |
@@ -383,7 +385,8 @@ static int request_microcode_fw(int cpu, struct device *device) | |||
383 | 385 | ||
384 | ret = request_firmware(&firmware, fw_name, device); | 386 | ret = request_firmware(&firmware, fw_name, device); |
385 | if (ret) { | 387 | if (ret) { |
386 | printk(KERN_ERR "microcode: ucode data file %s load failed\n", fw_name); | 388 | printk(KERN_ERR "microcode: ucode data file %s load failed\n", |
389 | fw_name); | ||
387 | return ret; | 390 | return ret; |
388 | } | 391 | } |
389 | 392 | ||
@@ -397,8 +400,8 @@ static int request_microcode_fw(int cpu, struct device *device) | |||
397 | 400 | ||
398 | static int request_microcode_user(int cpu, const void __user *buf, size_t size) | 401 | static int request_microcode_user(int cpu, const void __user *buf, size_t size) |
399 | { | 402 | { |
400 | printk(KERN_WARNING "microcode: AMD microcode update via /dev/cpu/microcode" | 403 | printk(KERN_WARNING "microcode: AMD microcode update via " |
401 | "is not supported\n"); | 404 | "/dev/cpu/microcode is not supported\n"); |
402 | return -1; | 405 | return -1; |
403 | } | 406 | } |
404 | 407 | ||