Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3384105pxb; Mon, 17 Jan 2022 19:13:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzFHRtq7azGmhoMCtXDzHXZ8yzy7OumG+A6Op9WJz3fU8/dSXhv+dbES+Qd32PSQjZ7gmO X-Received: by 2002:a62:7c57:0:b0:4bd:fa44:95df with SMTP id x84-20020a627c57000000b004bdfa4495dfmr23703111pfc.53.1642475614283; Mon, 17 Jan 2022 19:13:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642475614; cv=none; d=google.com; s=arc-20160816; b=BmOxzOmFGraOdzdyDGqqYnzrv45Tk0mBPd1LqvNob1+kHIRr6pMHM3RVu+VJWGwTh9 oLdDigUDS4Fwo2ybuw9s7DeuaXXjTn7Ejh/8QhqCH1pL5eha8Z9F0vAcxHGguJztmKpI CkNT7kn63BnU6Clij6p6HzDXVjbD4SSQZ4wO15OPFCuuBudpH9PlV/oPdUbSjW108bvZ fCcmU17dgI9sJe4RDWx3NXhIhRG6rLdOXYR8FV1wJSUitPsgQT5DWdW7E9PT93iUyKpx w6FCzsuqXSKHP3GQkDORTVvDARVmLzgGzOMMX84WdEH9s2brTCcqzyQW/aBb5hVN8oMR 7Z3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=r3vIKaUcZvp/TohdFnR+IfSeTlSFJuTQRm9v2H3uF8U=; b=iIobaS0hPv/vq642fEk42BfjiJ1EnMkE29tBfUV4X1SOiuLzC94zJpGiUQdASaC8Cp Za7fh+Z9c+/X1T1qGvRAYHsh/j6ZpaFLV0kTrv4/vwA46ZQ4NhjC9tWNnMeFZD6s07Hf JtCSUkW5i8Q/+ttAz/siJiPaDXpgXd4PODR5VDTQiTVNy8S95I28OBc4PKmAXO5lLWGr nNMThtMd5s5neBz8A0ujFBDQei6E6NVkGD5RDljwwR97Ap2WFPMAXkpAqFLybQP7x/V8 PyDJxfp5arCmhp5KznjNizIbHJTafzde3j1xZOhuluOHvsLAicEaLDJy+CUrFS80YqCF Zo7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kuKdllV5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f10si1150991plj.263.2022.01.17.19.13.21; Mon, 17 Jan 2022 19:13:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kuKdllV5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244945AbiARCWK (ORCPT + 99 others); Mon, 17 Jan 2022 21:22:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244854AbiARCVy (ORCPT ); Mon, 17 Jan 2022 21:21:54 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A522C061746; Mon, 17 Jan 2022 18:21:54 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B88FCB81233; Tue, 18 Jan 2022 02:21:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4872C36AE3; Tue, 18 Jan 2022 02:21:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642472511; bh=wNtTxl+7OJwp4XfQcWDBPvTn86mQUGQpqISqFTZAWxc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kuKdllV5iX89R6MT2H13cM2dDHY3/koKAGj0xAs0e/Sm86qbV7uT0wkYvcDmUuab/ nvl9qgdh8CTI+3AMR+vE2Ok9HVaMMvsVbuRhZMK8i3Dm4VC1umPHmgWzD/Z7uNG0BW wAYOsG1QDVBUrnqGs+EL3IdjOlPMhJO7g4LQqdUIr+wIA/hkQqJvzYFq/K4pGzFurw IqPHdj8aSYX8vM9w6QgKTKAAno/du2iwJ6bZpeiSmKvRjYB+nmp+VdCKDXqIe5RrKp 2s49461WOOhy1CE+54h0oOhAhhsseRzrxJyzDo5zNq1gCjybPxDvhNNuMgcd2WBv8O mgVuMWcmqg9Yw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jakub Kicinski , "David S . Miller" , Sasha Levin , liweihang@huawei.com, liuyixing1@huawei.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.16 037/217] amd: hplance: use eth_hw_addr_set() Date: Mon, 17 Jan 2022 21:16:40 -0500 Message-Id: <20220118021940.1942199-37-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220118021940.1942199-1-sashal@kernel.org> References: <20220118021940.1942199-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jakub Kicinski [ Upstream commit 21942eef062781429b356974589d7965952940fb ] Byte by byte assignments. Fixes build on m68k. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/amd/hplance.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amd/hplance.c b/drivers/net/ethernet/amd/hplance.c index 6784f8748638b..055fda11c5724 100644 --- a/drivers/net/ethernet/amd/hplance.c +++ b/drivers/net/ethernet/amd/hplance.c @@ -129,6 +129,7 @@ static void hplance_init(struct net_device *dev, struct dio_dev *d) { unsigned long va = (d->resource.start + DIO_VIRADDRBASE); struct hplance_private *lp; + u8 addr[ETH_ALEN]; int i; /* reset the board */ @@ -144,9 +145,10 @@ static void hplance_init(struct net_device *dev, struct dio_dev *d) /* The NVRAM holds our ethernet address, one nibble per byte, * at bytes NVRAMOFF+1,3,5,7,9... */ - dev->dev_addr[i] = ((in_8(va + HPLANCE_NVRAMOFF + i*4 + 1) & 0xF) << 4) + addr[i] = ((in_8(va + HPLANCE_NVRAMOFF + i*4 + 1) & 0xF) << 4) | (in_8(va + HPLANCE_NVRAMOFF + i*4 + 3) & 0xF); } + eth_hw_addr_set(dev, addr); lp = netdev_priv(dev); lp->lance.name = d->name; -- 2.34.1