From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752856AbdJ3UvR (ORCPT ); Mon, 30 Oct 2017 16:51:17 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:55132 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751905AbdJ3UvO (ORCPT ); Mon, 30 Oct 2017 16:51:14 -0400 X-Google-Smtp-Source: ABhQp+SwSOTSGGzYSsXkvwDJWNqOSN0Ab5lK4crHXomKa3uvPFhcfzRR1fPOB3Cq94s+oYdnv2Vp6Q== Subject: Re: [PATCH] ravb: Use common error handling code in ravb_probe() To: SF Markus Elfring , netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Dan Carpenter , "David S. Miller" , Eugeniu Rosca , Kazuya Mizuguchi , Masaru Nagai , =?UTF-8?Q?Niklas_S=c3=b6derlund?= , Simon Horman , Yuval Shaia Cc: LKML , kernel-janitors@vger.kernel.org References: <2839c3c2-0116-7549-6ff4-a49eb0a52298@users.sourceforge.net> From: Sergei Shtylyov Organization: Cogent Embedded Message-ID: Date: Mon, 30 Oct 2017 23:51:09 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <2839c3c2-0116-7549-6ff4-a49eb0a52298@users.sourceforge.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-MW Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! On 10/28/2017 08:19 PM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 28 Oct 2017 19:10:08 +0200 > > Add a jump target so that a bit of exception handling can be better reused > at the end of this function. Have you actually tried to see if there's any change in the resulting object code? I've looked at ARM gcc 4.8.5's output and it didn't really change -- gcc was able to optimize these repetitive assignments pretty well... > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring > --- > drivers/net/ethernet/renesas/ravb_main.c | 32 ++++++++++++++++---------------- > 1 file changed, 16 insertions(+), 16 deletions(-) Diffstat also speaks about the futility of this patch. > diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c > index a8822a756e08..62dbdf7de6cd 100644 > --- a/drivers/net/ethernet/renesas/ravb_main.c > +++ b/drivers/net/ethernet/renesas/ravb_main.c > @@ -2226,6 +2222,10 @@ static int ravb_probe(struct platform_device *pdev) > pm_runtime_put(&pdev->dev); > pm_runtime_disable(&pdev->dev); > return error; > + > +failure_indication: Pretty poor label name -- I would've preferred 'no_irq' or smth... > + error = irq; > + goto out_release; The only good thing is that looking at the assembly, I was able to figure out that 'ndev' check at 'out_release' is futile... :-) [...] MBR, Sergei