Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756152AbcCNUsX (ORCPT ); Mon, 14 Mar 2016 16:48:23 -0400 Received: from mail-bl2nam02on0078.outbound.protection.outlook.com ([104.47.38.78]:15920 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756054AbcCNUsV (ORCPT ); Mon, 14 Mar 2016 16:48:21 -0400 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; ettus.com; dkim=none (message not signed) header.d=none;ettus.com; dmarc=bestguesspass action=none header.from=xilinx.com; Subject: Re: [PATCH 4/5] net: macb: Use ether_addr_copy over memcpy To: Moritz Fischer , References: <1457896247-25934-1-git-send-email-moritz.fischer@ettus.com> <1457896247-25934-5-git-send-email-moritz.fischer@ettus.com> CC: , , , , , From: Michal Simek Message-ID: <56E7238B.7030807@xilinx.com> Date: Mon, 14 Mar 2016 21:48:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1457896247-25934-5-git-send-email-moritz.fischer@ettus.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-8.0.0.1202-22192.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.100;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(199003)(24454002)(189002)(106466001)(87936001)(33656002)(63266004)(4326007)(59896002)(4001350100001)(87266999)(2906002)(76176999)(50986999)(65956001)(77096005)(5008740100001)(54356999)(65816999)(65806001)(2950100001)(36756003)(47776003)(11100500001)(80316001)(1220700001)(5001770100001)(230700001)(19580395003)(50466002)(19580405001)(1096002)(86362001)(586003)(575784001)(189998001)(92566002)(64126003)(6806005)(81166005)(83506001)(23746002)(36386004)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:BL2NAM02HT056;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;MLV:sfv;A:1;MX:1;LANG:en; X-MS-Office365-Filtering-Correlation-Id: 49d8df56-3170-4a75-d217-08d34c49f928 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(8251501002);SRVR:BL2NAM02HT056; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(13018025)(5005006)(13017025)(8121501046)(13023025)(13024025)(13015025)(3002001)(10201501046);SRVR:BL2NAM02HT056;BCL:0;PCL:0;RULEID:;SRVR:BL2NAM02HT056; X-Forefront-PRVS: 0881A7A935 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2016 20:48:18.4022 (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: BL2NAM02HT056 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 814 Lines: 26 On 13.3.2016 20:10, Moritz Fischer wrote: > Checkpatch suggests using ether_addr_copy over memcpy > to copy the mac address. > > Signed-off-by: Moritz Fischer > --- > drivers/net/ethernet/cadence/macb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c > index 53400f6..a0c01e5 100644 > --- a/drivers/net/ethernet/cadence/macb.c > +++ b/drivers/net/ethernet/cadence/macb.c > @@ -2891,7 +2891,7 @@ static int macb_probe(struct platform_device *pdev) > > 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 > macb_get_hwaddr(bp); > > Acked-by: Michal Simek M