From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752180AbbJCLNg (ORCPT ); Sat, 3 Oct 2015 07:13:36 -0400 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 Subject: Re: [PATCH 00/18] Input - Fix make coccicheck warnings To: Dmitry Torokhov References: <1443793229-22363-1-git-send-email-javier@osg.samsung.com> <20151002182507.GQ8437@dtor-ws> From: Javier Martinez Canillas X-Enigmail-Draft-Status: N1110 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 , Dan Carpenter Message-ID: <560FB853.6040000@osg.samsung.com> Date: Sat, 3 Oct 2015 13:13:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <20151002182507.GQ8437@dtor-ws> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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