lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
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