Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933295AbcCIQaG (ORCPT ); Wed, 9 Mar 2016 11:30:06 -0500 Received: from mail-cys01nam02on0040.outbound.protection.outlook.com ([104.47.37.40]:41433 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933265AbcCIQ3x (ORCPT ); Wed, 9 Mar 2016 11:29:53 -0500 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; atmel.com; dkim=none (message not signed) header.d=none;atmel.com; dmarc=bestguesspass action=none header.from=xilinx.com; Subject: Re: [PATCH 0/3] net: macb: Fix coding style issues To: Nicolas Ferre , Moritz Fischer , Michal Simek , "Cyrille Pitchen" , David Miller , Punnaiah Choudary Kalluri References: <1457367460-9123-1-git-send-email-moritz.fischer@ettus.com> <56DDB6CA.8000100@atmel.com> CC: , From: Michal Simek Message-ID: <56E04F73.6030504@xilinx.com> Date: Wed, 9 Mar 2016 17:29:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56DDB6CA.8000100@atmel.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22180.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.100;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(164054003)(24454002)(189002)(199003)(479174004)(4001450100002)(5008740100001)(87936001)(6806005)(63266004)(83506001)(86362001)(64126003)(23746002)(50466002)(36386004)(81166005)(92566002)(76176999)(189998001)(54356999)(33656002)(87266999)(47776003)(50986999)(11100500001)(4001350100001)(5001770100001)(65806001)(4326007)(2870700001)(77096005)(2906002)(106466001)(36756003)(2950100001)(1096002)(586003)(80316001)(1220700001)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1NAM02HT170;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;MLV:sfv;MX:1;A:1;LANG:en; X-MS-Office365-Filtering-Correlation-Id: 85d0537b-e095-465b-a2b0-08d3483809bf X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(8251501002);SRVR:CY1NAM02HT170; X-Microsoft-Antispam-PRVS: <8666e3ddadc840e997f726f0ac22d0ea@CY1NAM02HT170.eop-nam02.prod.protection.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(13023025)(13015025)(5005006)(13017025)(8121501046)(13024025)(13018025)(3002001)(10201501046);SRVR:CY1NAM02HT170;BCL:0;PCL:0;RULEID:;SRVR:CY1NAM02HT170; X-Forefront-PRVS: 0876988AF0 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2016 16:29:50.4700 (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.100];Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1NAM02HT170 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1450 Lines: 41 On 7.3.2016 18:13, Nicolas Ferre wrote: > Le 07/03/2016 17:17, Moritz Fischer a ?crit : >> Hi Nicolas, >> >> this series deals with most of the checkpatch warnings >> generated for macb. There are two BUG_ON()'s that I didn't touch, yet, >> that were suggested by checkpatch, that I can address in a follow up >> commit if needed. >> Let me know if you want me to split the fixes differently or squash >> them into one commit. > > Hi, > > I'm not usually fond of this type of patches, but I must admit that this > series corrects some style issues. > > So, I would like more feedback from Michal and Cyrille as these changes > may delay some of the not-merged-yet features or more important > work-in-progress on their side. > > On the other hand, if we all think it's a calm period for this macb > driver, we may find interesting to merge some "cleanup and style" > enhancements. Not a problem with merging cleanups in general. We have several out of tree patches but doesn't make sense to to wait. I wasn't in cc for the series but I don't like this change to be the part of cleanup series. mac = of_get_mac_address(np); if (mac) - memcpy(bp->dev->dev_addr, mac, ETH_ALEN); + ether_addr_copy(bp->dev->dev_addr, mac); else Also extending scope of variables is not the right way to go. Especially when some automation tools are reporting that you should reduce scope of use for them. Wolfram is checking it for example. Thanks, Michal