From mboxrd@z Thu Jan 1 00:00:00 1970 From: Javier Martinez Canillas Subject: Re: [PATCH 00/18] Input - Fix make coccicheck warnings Date: Sat, 3 Oct 2015 13:13:23 +0200 Message-ID: <560FB853.6040000@osg.samsung.com> References: <1443793229-22363-1-git-send-email-javier@osg.samsung.com> <20151002182507.GQ8437@dtor-ws> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: Received: from lists.s-osg.org ([54.187.51.154]:47159 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751839AbbJCLNe (ORCPT ); Sat, 3 Oct 2015 07:13:34 -0400 In-Reply-To: <20151002182507.GQ8437@dtor-ws> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Dmitry Torokhov Cc: linux-kernel@vger.kernel.org, Ferruh Yigit , Axel Lin , Pramod Gurav , Benjamin Tissoires , Heiko Stuebner , Fabio Estevam , Hans de Goede , Rasmus Villemoes , Rob Herring , Dirk Behme , Benson Leung , Shailendra Verma , Krzysztof Kozlowski , linux-input@vger.kernel.org, Duson Lin , Jingoo Han , Wolfram Sang , Wei Yongjun , Henrik Rydberg , Daniel Mack , Nick Dyer , Matt Ranostay Hello Dmitry, On 10/02/2015 08:25 PM, Dmitry Torokhov wrote: > Hi Javier, > > On Fri, Oct 02, 2015 at 03:40:11PM +0200, Javier Martinez Canillas wrote: >> Hello Dmitry, >> >> This series contains trivial patches with fixes to different warnings >> reported by make coccichek M=drivers/input. >> >> The patches don't contain functional changes but makes the functions >> simpler and removes unnecessary lines of code. > > I disagree with some "simplify function return logic" patches: when > there are several actions that may fail I prefer explicit: > > error = actionN(); > if (error) > return error; > > return 0; > > even on the last one as it keep with the code flow and makes it easier > to move stuff around. > > Please consider patches that not explicitly replied to as applied a > dropped. Thanks a lot for taking the time to explain this. I understand your rationale and I tend to agree. I'll see if the scripts/coccinelle/misc/simple_return.cocci semantic patch can be modified to take this into account and not report a warning for that pattern. > > Thanks. > Best regards, -- Javier Martinez Canillas Open Source Group Samsung Research America