Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754668AbdGJUXF (ORCPT ); Mon, 10 Jul 2017 16:23:05 -0400 Received: from gateway20.websitewelcome.com ([192.185.65.13]:21062 "EHLO gateway20.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752353AbdGJUXE (ORCPT ); Mon, 10 Jul 2017 16:23:04 -0400 X-Greylist: delayed 1490 seconds by postgrey-1.27 at vger.kernel.org; Mon, 10 Jul 2017 16:23:04 EDT Date: Mon, 10 Jul 2017 14:58:11 -0500 Message-ID: <20170710145811.Horde.met9v3oXkVEKp-ml-mFMK-d@gator4166.hostgator.com> From: "Gustavo A. R. Silva" To: Oliver Neukum Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH] usb: isp1760: compress return logic into one line References: <20170710020007.GA30095@embeddedgus> <1499672197.12673.1.camel@suse.com> In-Reply-To: <1499672197.12673.1.camel@suse.com> User-Agent: Horde Application Framework 5 Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 108.167.133.22 X-Exim-ID: 1dUeou-003OCz-1q X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: gator4166.hostgator.com [108.167.133.22]:23742 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 58 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 693 Lines: 29 Hi Oliver, Quoting Oliver Neukum : > Am Sonntag, den 09.07.2017, 21:00 -0500 schrieb Gustavo A. R. Silva : >> Simplify return logic to avoid unnecessary variable assignment. >> >> This issue was detected using Coccinelle and the following >> semantic patch: >> > > Hi, > > I need to ask: Where is the improvement? The compiler does not bother > and for the human reader you do not do anything obvious and you > decreased grepability. > The declaration of local variable _retval_ was removed also. So both, variable declaration and assignment removal are the improvements. Regarding the greability, I think that depends on the context. Thanks! -- Gustavo A. R. Silva