From fa8e74ea69195941841e20d606d480a8ad13f15b Mon Sep 17 00:00:00 2001 From: Choi Gi-yong Date: Sun, 9 Mar 2014 16:51:28 +0900 Subject: [PATCH] mm: Fixed coding style and added static const keywords Signed-off-by: Choi Gi-yong --- mm/percpu.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mm/percpu.c b/mm/percpu.c index dca284f..ff6cce2 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -714,8 +714,7 @@ static void __percpu *pcpu_alloc(size_t size, size_t align, bool reserved) void __percpu *ptr; if (unlikely(!size || size > PCPU_MIN_UNIT_SIZE || align > PAGE_SIZE)) { - WARN(true, "illegal size (%zu) or align (%zu) for " - "percpu allocation\n", size, align); + WARN(true, "illegal size (%zu) or align (%zu) for percpu allocation\n", size, align); return NULL; } @@ -968,7 +967,7 @@ bool is_kernel_percpu_address(unsigned long addr) void *start = per_cpu_ptr(base, cpu); if ((void *)addr >= start && (void *)addr < start + static_size) - return true; + return true; } #endif /* on UP, can't distinguish from other static vars, always false */ @@ -1483,7 +1482,7 @@ static struct pcpu_alloc_info * __init pcpu_build_alloc_info( /* group cpus according to their proximity */ for_each_possible_cpu(cpu) { group = 0; - next_group: +next_group: for_each_possible_cpu(tcpu) { if (cpu == tcpu) break; @@ -1929,7 +1928,9 @@ void __init setup_per_cpu_areas(void) */ void __init percpu_init_late(void) { - struct pcpu_chunk *target_chunks[] = { pcpu_first_chunk, pcpu_reserved_chunk, NULL }; + static const struct pcpu_chunk *target_chunks[] = { + pcpu_first_chunk, pcpu_reserved_chunk, NULL + }; struct pcpu_chunk *chunk; unsigned long flags; int i; -- 1.8.3.2