Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1585346
| From | Alex Elder <elder@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [greybus-dev] [Outreachy kernel] [PATCH v2 3/6] staging: greybus: Remove unnecessary braces |
| Date | 2017-02-21 14:50 +0100 |
| Message-ID | <tdiZj-3dA-13@gated-at.bofh.it> (permalink) |
| References | <tdiwi-340-21@gated-at.bofh.it> <tdiFY-37b-17@gated-at.bofh.it> <tdiZj-3dA-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 3/6] staging: greybus: Remove unnecessary braces simran singhal <singhalsimran0@gmail.com> - 2017-02-21 14:20 +0100
Re: [Outreachy kernel] [PATCH v2 3/6] staging: greybus: Remove unnecessary braces Julia Lawall <julia.lawall@lip6.fr> - 2017-02-21 14:30 +0100
Re: [Outreachy kernel] [PATCH v2 3/6] staging: greybus: Remove unnecessary braces Johan Hovold <johan@kernel.org> - 2017-02-21 14:50 +0100
Re: [greybus-dev] [Outreachy kernel] [PATCH v2 3/6] staging: greybus: Remove unnecessary braces Alex Elder <elder@linaro.org> - 2017-02-21 14:50 +0100
Re: [Outreachy kernel] [PATCH v2 3/6] staging: greybus: Remove unnecessary braces Julia Lawall <julia.lawall@lip6.fr> - 2017-02-21 14:30 +0100
csiph-web