diff options
author | Peter Oruba <peter.oruba@amd.com> | 2008-08-01 06:46:45 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-15 11:18:45 -0400 |
commit | d33dcb9e7d272cc3171dcc3a21049902185ab03d (patch) | |
tree | 9ccd9f6f728c2d7fbd1648ae142690baf9cdad3b /arch/x86/kernel/microcode.c | |
parent | 34a1b9fc4995102ecbb3a980b348aebf168d8196 (diff) |
x86: Microcode patch loader style corrections
Style corrections to main microcode module.
Signed-off-by: Peter Oruba <peter.oruba@amd.com>
Cc: Peter Oruba <peter.oruba@amd.com>
Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/microcode.c')
-rw-r--r-- | arch/x86/kernel/microcode.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/arch/x86/kernel/microcode.c b/arch/x86/kernel/microcode.c index 28dba1a6e4aa..39961bb83293 100644 --- a/arch/x86/kernel/microcode.c +++ b/arch/x86/kernel/microcode.c | |||
@@ -55,8 +55,8 @@ | |||
55 | * in a single CPU package. | 55 | * in a single CPU package. |
56 | * 1.10 28 Feb 2002 Asit K Mallick <asit.k.mallick@intel.com> and | 56 | * 1.10 28 Feb 2002 Asit K Mallick <asit.k.mallick@intel.com> and |
57 | * Tigran Aivazian <tigran@veritas.com>, | 57 | * Tigran Aivazian <tigran@veritas.com>, |
58 | * Serialize updates as required on HT processors due to speculative | 58 | * Serialize updates as required on HT processors due to |
59 | * nature of implementation. | 59 | * speculative nature of implementation. |
60 | * 1.11 22 Mar 2002 Tigran Aivazian <tigran@veritas.com> | 60 | * 1.11 22 Mar 2002 Tigran Aivazian <tigran@veritas.com> |
61 | * Fix the panic when writing zero-length microcode chunk. | 61 | * Fix the panic when writing zero-length microcode chunk. |
62 | * 1.12 29 Sep 2003 Nitin Kamble <nitin.a.kamble@intel.com>, | 62 | * 1.12 29 Sep 2003 Nitin Kamble <nitin.a.kamble@intel.com>, |
@@ -71,7 +71,7 @@ | |||
71 | * Thanks to Stuart Swales for pointing out this bug. | 71 | * Thanks to Stuart Swales for pointing out this bug. |
72 | */ | 72 | */ |
73 | 73 | ||
74 | //#define DEBUG /* pr_debug */ | 74 | /*#define DEBUG pr_debug */ |
75 | #include <linux/capability.h> | 75 | #include <linux/capability.h> |
76 | #include <linux/kernel.h> | 76 | #include <linux/kernel.h> |
77 | #include <linux/init.h> | 77 | #include <linux/init.h> |
@@ -116,7 +116,7 @@ EXPORT_SYMBOL_GPL(user_buffer); | |||
116 | unsigned int user_buffer_size; /* it's size */ | 116 | unsigned int user_buffer_size; /* it's size */ |
117 | EXPORT_SYMBOL_GPL(user_buffer_size); | 117 | EXPORT_SYMBOL_GPL(user_buffer_size); |
118 | 118 | ||
119 | static int do_microcode_update (void) | 119 | static int do_microcode_update(void) |
120 | { | 120 | { |
121 | long cursor = 0; | 121 | long cursor = 0; |
122 | int error = 0; | 122 | int error = 0; |
@@ -158,18 +158,20 @@ out: | |||
158 | return error; | 158 | return error; |
159 | } | 159 | } |
160 | 160 | ||
161 | static int microcode_open (struct inode *unused1, struct file *unused2) | 161 | static int microcode_open(struct inode *unused1, struct file *unused2) |
162 | { | 162 | { |
163 | cycle_kernel_lock(); | 163 | cycle_kernel_lock(); |
164 | return capable(CAP_SYS_RAWIO) ? 0 : -EPERM; | 164 | return capable(CAP_SYS_RAWIO) ? 0 : -EPERM; |
165 | } | 165 | } |
166 | 166 | ||
167 | static ssize_t microcode_write (struct file *file, const char __user *buf, size_t len, loff_t *ppos) | 167 | static ssize_t microcode_write(struct file *file, const char __user *buf, |
168 | size_t len, loff_t *ppos) | ||
168 | { | 169 | { |
169 | ssize_t ret; | 170 | ssize_t ret; |
170 | 171 | ||
171 | if ((len >> PAGE_SHIFT) > num_physpages) { | 172 | if ((len >> PAGE_SHIFT) > num_physpages) { |
172 | printk(KERN_ERR "microcode: too much data (max %ld pages)\n", num_physpages); | 173 | printk(KERN_ERR "microcode: too much data (max %ld pages)\n", |
174 | num_physpages); | ||
173 | return -EINVAL; | 175 | return -EINVAL; |
174 | } | 176 | } |
175 | 177 | ||
@@ -201,7 +203,7 @@ static struct miscdevice microcode_dev = { | |||
201 | .fops = µcode_fops, | 203 | .fops = µcode_fops, |
202 | }; | 204 | }; |
203 | 205 | ||
204 | static int __init microcode_dev_init (void) | 206 | static int __init microcode_dev_init(void) |
205 | { | 207 | { |
206 | int error; | 208 | int error; |
207 | 209 | ||
@@ -216,7 +218,7 @@ static int __init microcode_dev_init (void) | |||
216 | return 0; | 218 | return 0; |
217 | } | 219 | } |
218 | 220 | ||
219 | static void microcode_dev_exit (void) | 221 | static void microcode_dev_exit(void) |
220 | { | 222 | { |
221 | misc_deregister(µcode_dev); | 223 | misc_deregister(µcode_dev); |
222 | } | 224 | } |
@@ -224,7 +226,7 @@ static void microcode_dev_exit (void) | |||
224 | MODULE_ALIAS_MISCDEV(MICROCODE_MINOR); | 226 | MODULE_ALIAS_MISCDEV(MICROCODE_MINOR); |
225 | #else | 227 | #else |
226 | #define microcode_dev_init() 0 | 228 | #define microcode_dev_init() 0 |
227 | #define microcode_dev_exit() do { } while(0) | 229 | #define microcode_dev_exit() do { } while (0) |
228 | #endif | 230 | #endif |
229 | 231 | ||
230 | /* fake device for request_firmware */ | 232 | /* fake device for request_firmware */ |
@@ -451,7 +453,7 @@ int microcode_init(void *opaque, struct module *module) | |||
451 | } | 453 | } |
452 | EXPORT_SYMBOL_GPL(microcode_init); | 454 | EXPORT_SYMBOL_GPL(microcode_init); |
453 | 455 | ||
454 | void __exit microcode_exit (void) | 456 | void __exit microcode_exit(void) |
455 | { | 457 | { |
456 | microcode_dev_exit(); | 458 | microcode_dev_exit(); |
457 | 459 | ||