Messages in this thread | | | Subject | Re: [PATCH] mm: Fix Coding style | From | Joe Perches <> | Date | Fri, 07 Mar 2014 19:55:53 -0800 |
| |
On Sat, 2014-03-08 at 12:46 +0900, Choi Gi-yong wrote: [] > diff --git a/mm/percpu.c b/mm/percpu.c
Please run your suggested patches through checkpatch.
> @@ -715,7 +715,7 @@ static void __percpu *pcpu_alloc(size_t size, size_t align, bool reserved) > > 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); > + "percpu allocation\n", size, align);
It'd be better to coalesce the format fragments
[]
> @@ -968,8 +968,8 @@ 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; > + }
Not an improvement. Why do you think it's better?
> @@ -1929,8 +1929,7 @@ 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 }; > + struct pcpu_chunk *target_chunks[] = { pcpu_first_chunk, pcpu_reserved_chunk, NULL };
This exceeds 80 columns.
This would be better as:
struct pcpu_chunk *target_chunks[] = { pcpu_first_chunk, pcpu_reserved_chunk, NULL };
And perhaps this should be static const
> struct pcpu_chunk *chunk; > unsigned long flags; > int i;
| |