From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754615AbbEKP0e (ORCPT ); Mon, 11 May 2015 11:26:34 -0400 Received: from mail-bn1bon0095.outbound.protection.outlook.com ([157.56.111.95]:46912 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752781AbbEKP0b (ORCPT ); Mon, 11 May 2015 11:26:31 -0400 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; perches.com; dkim=none (message not signed) header.d=none; Message-ID: <5550CA19.8090404@xilinx.com> Date: Mon, 11 May 2015 17:26:17 +0200 From: Michal Simek User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Joe Perches , Michal Simek CC: , Julia Lawall , Markus Elfring Subject: Re: [PATCH v2] net: ll_temac: Use one return statement instead of two References: <3a0fa74dd703db5dac4816ef15b6a512ef0f2ec0.1431353091.git.michal.simek@xilinx.com> <1431355371.2884.11.camel@perches.com> In-Reply-To: <1431355371.2884.11.camel@perches.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-7.5.0.1018-21536.005 X-TM-AS-User-Approved-Sender: Yes;Yes;Yes X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.83;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(438002)(51704005)(377424004)(377454003)(24454002)(199003)(69234005)(189002)(479174004)(164054003)(4001350100001)(5001770100001)(33656002)(50986999)(86362001)(23746002)(76176999)(54356999)(87266999)(65816999)(6806004)(62966003)(77156002)(5001960100002)(80316001)(77096005)(36756003)(36386004)(2950100001)(92566002)(87936001)(83506001)(106466001)(50466002)(189998001)(46102003)(65806001)(63266004)(107986001)(4001450100001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN1BFFO11HUB025;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1BFFO11HUB025; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BN1BFFO11HUB025;BCL:0;PCL:0;RULEID:;SRVR:BN1BFFO11HUB025; X-Forefront-PRVS: 05739BA1B5 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2015 15:26:29.6182 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1BFFO11HUB025 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/11/2015 04:42 PM, Joe Perches wrote: > On Mon, 2015-05-11 at 16:05 +0200, Michal Simek wrote: >> Use one return statement instead of two to simplify the code. >> Both are returning the same value. > > trivia and FYI: But still correct right? > > I think there are about 100 of these in kernel tree > and I'm not going to submit patches. > > $ grep-2.5.4 -rP --include=*.[ch] -n "^([\t]+)\treturn[ \t]+([A-Za-z0-9\_\>\(\)\.\>\[\]\-]+);\n(\1}\n)?\1return[ \t]+\2;" * | \ > grep -P "^[\w\/\.]+:\d+:" Are you suggesting that someone else should send patches for it? I expect that this is something what Julia can check with coccinelle and can be added to scripts folder. Thanks, Michal