lkml.org 
[lkml]   [2017]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [greybus-dev] [Outreachy kernel] [PATCH v2 3/6] staging: greybus: Remove unnecessary braces
From
Date
On 02/21/2017 07:44 AM, Johan Hovold wrote:
> On Tue, Feb 21, 2017 at 02:20:50PM +0100, Julia Lawall wrote:
>>
>>
>> On Tue, 21 Feb 2017, simran singhal wrote:
>>
>>> This patch removes braces for single statement blocks. The warning
>>> was detected using checkpatch.pl.
>>> Coccinelle was used to make the change.
>>>
>>> @@
>>> expression e,e1;
>>> @@
>>> - if (e) {
>>> + if (e)
>>> e1;
>>> - }
>>>
>>> Signed-off-by: simran singhal <singhalsimran0@gmail.com>
>>
>> Acked-by: Julia Lawall <julia.lawall@lip6.fr>
>
> I do not think this patch should be merged.
>
> Note that all of the braces you are removing are for single statements
> that span multiple lines, and that is precisely why the braces were
> added in the first place. Having braces for such statements often
> increase readability even if they are not mandated by the coding
> standard.
>
> So I suggest this patch is dropped.

I concur. I think the change was well-intended but I find the
practice Johan describes to improve readability of the code.

-Alex

>
> Thanks,
> Johan
> _______________________________________________
> greybus-dev mailing list
> greybus-dev@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/greybus-dev
>

\
 
 \ /
  Last update: 2017-02-21 14:47    [W:0.035 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site