From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753402AbdBUNqV (ORCPT ); Tue, 21 Feb 2017 08:46:21 -0500 Received: from mail-it0-f46.google.com ([209.85.214.46]:37461 "EHLO mail-it0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752574AbdBUNqN (ORCPT ); Tue, 21 Feb 2017 08:46:13 -0500 Subject: Re: [greybus-dev] [Outreachy kernel] [PATCH v2 3/6] staging: greybus: Remove unnecessary braces To: Johan Hovold , Julia Lawall References: <20170221131535.GA3718@singhal-Inspiron-5558> <20170221134436.GB10245@localhost> Cc: devel@driverdev.osuosl.org, elder@kernel.org, outreachy-kernel@googlegroups.com, linux-kernel@vger.kernel.org, greybus-dev@lists.linaro.org, simran singhal From: Alex Elder Message-ID: <0eb2a09f-e445-fe72-f848-79bd2fcccd56@linaro.org> Date: Tue, 21 Feb 2017 07:46:11 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170221134436.GB10245@localhost> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> >> Acked-by: Julia Lawall > > 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 >