[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAH4bKb0Di7cQoaE5cytcRM4mGLHkHP10oFuOu97cZu_z=gfvmw@mail.gmail.com>
Date: Sun, 9 Mar 2014 17:00:04 +0900
From: ÃÖ(Choi)±â¿ë(Gi-yong) <yong@...y.org>
To: Joe Perches <joe@...ches.com>
Cc: tj@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: Fix Coding style
>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?
I thought it would be better indent when return operation is fit in there.
but it wouldn't sorry for my mistake.
>> @@ -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
I couldn't fix 717 line exceed problem.
What can i do?
Sorry for my e-mail was rejected by vger.kernel.org server.
--
ÃÖ ±â¿ë
Choi Gi-yong
2014-03-09 16:55 GMT+09:00 ÃÖ(Choi)±â¿ë(Gi-yong) <yong@...y.org>:
> 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?
>
> I thought it would be better indent when return operation is fit in there.
> but it wouldn't sorry for my mistake.
>
>>> @@ -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
>
> I couldn't fix 717 line exceed problem.
> What can i do?
>
>
>
> --
>
> ÃÖ ±â¿ë
> Choi Gi-yong
--
ÃÖ ±â¿ë
Choi Gi-yong
View attachment "0001-mm-Fixed-coding-style-and-added-static-const-keyword.patch" of type "text/x-patch" (1794 bytes)
Powered by blists - more mailing lists