diff options
author | Tejun Heo <tj@kernel.org> | 2009-02-24 20:38:10 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-02-24 20:38:10 -0500 |
commit | 24ff954233ecfd45801383f831626f88937ebe6f (patch) | |
tree | 832ee461666bf84980668ade198359d60a691d9a | |
parent | 0edcf8d6926f4038443dbc24e319530177ca0353 (diff) |
x86, percpu: fix minor bugs in setup_percpu.c
Recent changes in setup_percpu.c made a now meaningless DBG()
statement fail to compile and introduced a
comparison-of-different-types warning. Fix them.
Compile failure is reported by Ingo Molnar.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/setup_percpu.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c index 2d946a8f78b9..c29f301d3885 100644 --- a/arch/x86/kernel/setup_percpu.c +++ b/arch/x86/kernel/setup_percpu.c | |||
@@ -270,7 +270,7 @@ static ssize_t __init setup_pcpu_embed(size_t static_size) | |||
270 | 270 | ||
271 | /* allocate and copy */ | 271 | /* allocate and copy */ |
272 | pcpue_unit_size = PFN_ALIGN(static_size + PERCPU_DYNAMIC_RESERVE); | 272 | pcpue_unit_size = PFN_ALIGN(static_size + PERCPU_DYNAMIC_RESERVE); |
273 | pcpue_unit_size = max(pcpue_unit_size, PCPU_MIN_UNIT_SIZE); | 273 | pcpue_unit_size = max_t(size_t, pcpue_unit_size, PCPU_MIN_UNIT_SIZE); |
274 | pcpue_ptr = pcpu_alloc_bootmem(0, num_possible_cpus() * pcpue_unit_size, | 274 | pcpue_ptr = pcpu_alloc_bootmem(0, num_possible_cpus() * pcpue_unit_size, |
275 | PAGE_SIZE); | 275 | PAGE_SIZE); |
276 | if (!pcpue_ptr) | 276 | if (!pcpue_ptr) |
@@ -438,8 +438,6 @@ void __init setup_per_cpu_areas(void) | |||
438 | */ | 438 | */ |
439 | if (cpu == boot_cpu_id) | 439 | if (cpu == boot_cpu_id) |
440 | switch_to_new_gdt(cpu); | 440 | switch_to_new_gdt(cpu); |
441 | |||
442 | DBG("PERCPU: cpu %4d %p\n", cpu, ptr); | ||
443 | } | 441 | } |
444 | 442 | ||
445 | /* indicate the early static arrays will soon be gone */ | 443 | /* indicate the early static arrays will soon be gone */ |