Commit 4d51985e484dd11d9047dfcd1278ec9ccfb435d5
Committed by
Linus Torvalds
1 parent
34db18a054
Exists in
master
and in
7 other branches
kernel/cpu.c: fix many errors related to style.
Change the printk() calls to have the KERN_INFO/KERN_ERROR stuff, and fixes other coding style errors. Not _all_ of them are gone, though. [akpm@linux-foundation.org: revert the bits I disagree with] Signed-off-by: Michael Rodriguez <dkingston02@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 5 additions and 6 deletions Side-by-side Diff
kernel/cpu.c
... | ... | @@ -160,7 +160,6 @@ |
160 | 160 | { |
161 | 161 | BUG_ON(cpu_notify(val, v)); |
162 | 162 | } |
163 | - | |
164 | 163 | EXPORT_SYMBOL(register_cpu_notifier); |
165 | 164 | |
166 | 165 | void __ref unregister_cpu_notifier(struct notifier_block *nb) |
... | ... | @@ -205,7 +204,6 @@ |
205 | 204 | return err; |
206 | 205 | |
207 | 206 | cpu_notify(CPU_DYING | param->mod, param->hcpu); |
208 | - | |
209 | 207 | return 0; |
210 | 208 | } |
211 | 209 | |
... | ... | @@ -227,6 +225,7 @@ |
227 | 225 | return -EINVAL; |
228 | 226 | |
229 | 227 | cpu_hotplug_begin(); |
228 | + | |
230 | 229 | err = __cpu_notify(CPU_DOWN_PREPARE | mod, hcpu, -1, &nr_calls); |
231 | 230 | if (err) { |
232 | 231 | nr_calls--; |
... | ... | @@ -304,7 +303,7 @@ |
304 | 303 | ret = __cpu_notify(CPU_UP_PREPARE | mod, hcpu, -1, &nr_calls); |
305 | 304 | if (ret) { |
306 | 305 | nr_calls--; |
307 | - printk("%s: attempt to bring up CPU %u failed\n", | |
306 | + printk(KERN_WARNING "%s: attempt to bring up CPU %u failed\n", | |
308 | 307 | __func__, cpu); |
309 | 308 | goto out_notify; |
310 | 309 | } |
311 | 310 | |
... | ... | @@ -450,14 +449,14 @@ |
450 | 449 | if (cpumask_empty(frozen_cpus)) |
451 | 450 | goto out; |
452 | 451 | |
453 | - printk("Enabling non-boot CPUs ...\n"); | |
452 | + printk(KERN_INFO "Enabling non-boot CPUs ...\n"); | |
454 | 453 | |
455 | 454 | arch_enable_nonboot_cpus_begin(); |
456 | 455 | |
457 | 456 | for_each_cpu(cpu, frozen_cpus) { |
458 | 457 | error = _cpu_up(cpu, 1); |
459 | 458 | if (!error) { |
460 | - printk("CPU%d is up\n", cpu); | |
459 | + printk(KERN_INFO "CPU%d is up\n", cpu); | |
461 | 460 | continue; |
462 | 461 | } |
463 | 462 | printk(KERN_WARNING "Error taking CPU%d up: %d\n", cpu, error); |
... | ... | @@ -509,7 +508,7 @@ |
509 | 508 | */ |
510 | 509 | |
511 | 510 | /* cpu_bit_bitmap[0] is empty - so we can back into it */ |
512 | -#define MASK_DECLARE_1(x) [x+1][0] = 1UL << (x) | |
511 | +#define MASK_DECLARE_1(x) [x+1][0] = (1UL << (x)) | |
513 | 512 | #define MASK_DECLARE_2(x) MASK_DECLARE_1(x), MASK_DECLARE_1(x+1) |
514 | 513 | #define MASK_DECLARE_4(x) MASK_DECLARE_2(x), MASK_DECLARE_2(x+2) |
515 | 514 | #define MASK_DECLARE_8(x) MASK_DECLARE_4(x), MASK_DECLARE_4(x+4) |