Skip to content

Commit 4d51985

Browse files
dKingstontorvalds
authored andcommitted
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>
1 parent 34db18a commit 4d51985

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

‎kernel/cpu.c‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ static void cpu_notify_nofail(unsigned long val, void *v)
160160
{
161161
BUG_ON(cpu_notify(val, v));
162162
}
163-
164163
EXPORT_SYMBOL(register_cpu_notifier);
165164

166165
void __ref unregister_cpu_notifier(struct notifier_block *nb)
@@ -205,7 +204,6 @@ static int __ref take_cpu_down(void *_param)
205204
return err;
206205

207206
cpu_notify(CPU_DYING | param->mod, param->hcpu);
208-
209207
return 0;
210208
}
211209

@@ -227,6 +225,7 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
227225
return -EINVAL;
228226

229227
cpu_hotplug_begin();
228+
230229
err = __cpu_notify(CPU_DOWN_PREPARE | mod, hcpu, -1, &nr_calls);
231230
if (err) {
232231
nr_calls--;
@@ -304,7 +303,7 @@ static int __cpuinit _cpu_up(unsigned int cpu, int tasks_frozen)
304303
ret = __cpu_notify(CPU_UP_PREPARE | mod, hcpu, -1, &nr_calls);
305304
if (ret) {
306305
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",
308307
__func__, cpu);
309308
goto out_notify;
310309
}
@@ -450,14 +449,14 @@ void __ref enable_nonboot_cpus(void)
450449
if (cpumask_empty(frozen_cpus))
451450
goto out;
452451

453-
printk("Enabling non-boot CPUs ...\n");
452+
printk(KERN_INFO "Enabling non-boot CPUs ...\n");
454453

455454
arch_enable_nonboot_cpus_begin();
456455

457456
for_each_cpu(cpu, frozen_cpus) {
458457
error = _cpu_up(cpu, 1);
459458
if (!error) {
460-
printk("CPU%d is up\n", cpu);
459+
printk(KERN_INFO "CPU%d is up\n", cpu);
461460
continue;
462461
}
463462
printk(KERN_WARNING "Error taking CPU%d up: %d\n", cpu, error);
@@ -509,7 +508,7 @@ void __cpuinit notify_cpu_starting(unsigned int cpu)
509508
*/
510509

511510
/* 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))
513512
#define MASK_DECLARE_2(x) MASK_DECLARE_1(x), MASK_DECLARE_1(x+1)
514513
#define MASK_DECLARE_4(x) MASK_DECLARE_2(x), MASK_DECLARE_2(x+2)
515514
#define MASK_DECLARE_8(x) MASK_DECLARE_4(x), MASK_DECLARE_4(x+4)

0 commit comments

Comments
 (0)