Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3384320pxb; Mon, 17 Jan 2022 19:13:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJwyJFZHay82Mwz5cLl9fhBLG4L9Z4a+6XbBVuJeZru7+6+zdwZd8lNq+VCaYz8nbHHv/Pz7 X-Received: by 2002:a63:8c:: with SMTP id 134mr21574588pga.599.1642475638580; Mon, 17 Jan 2022 19:13:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642475638; cv=none; d=google.com; s=arc-20160816; b=ATabWrNF7ZaFri2yED3fV39cYlF+Eq+M4IgL/88xJ7VrLzyff+HvPk6R01jzCu8nin 0mzdyn/JdNSXCnVcQHuUsbA2dYmr8Vtfj5esmckLpDMuYYm9zzuonkpAMth7d65S6noN NU4pQEa1YlyX48Uj3cn+wjHmrf7LYrnAM/899tV6Xaq3c3c0U9u/5WdShYZgOSZu7Zub OyvP9y2KYGo9ek5/O0LpDlB1I1Z5pFMX6pIZgX3+eQO76XWCN9QHnejqtKCcFo7pKd2w mICALKQ4/+dBFrbjiV9f6eEAB5BTeOFrweY+22vDu6+t+83ZnW5mV7gbyjncEZ+2OU1l Wazw== 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=DmOioEslYE2IFnm8O3rof/pNO/IZ9iTTpsE8K/1tm2Q=; b=Htz/aOlq0r595VYBGIWF0Yf8m40Y+Y8ejj6lQKZX6RcvAxZGIioSiggBIOZDEuA/Ms T36OerW/oHzs2g7ZlJktTb8a4glcE3WkNBSYu6vX1rFP2+LIOQQCvvUKCXI4AMYOEz5t 55RlyE9ZOX5kqiD6h0jfzNkNqirrPl2nOR9ZxjgWFHkeWsIuVjSMbD2m8JQeUywQq7vA R+teha6KYLKWacmq+CUV0IpyuZPpJtsiNRJpQQG6wvK+n27zUjjX/RnjCIZIDPPesA/R g2+BGb9Hn1AV7ZckknTNvARYULMkRdlCu4RvSi6DwalP+MMviaoykAUUYe5HEpU0Xauo y02w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hCmdShSw; 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 t18si19608483pfg.210.2022.01.17.19.13.47; Mon, 17 Jan 2022 19:13:58 -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=hCmdShSw; 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 S245136AbiARCXG (ORCPT + 99 others); Mon, 17 Jan 2022 21:23:06 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:38332 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244586AbiARCVj (ORCPT ); Mon, 17 Jan 2022 21:21:39 -0500 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 dfw.source.kernel.org (Postfix) with ESMTPS id 89A32612B2; Tue, 18 Jan 2022 02:21:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24E34C36AEB; Tue, 18 Jan 2022 02:21:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642472499; bh=u5JUJtJGtwEbGCXg5DoXmcteX+k+OBcOtiqBHR/BRvE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hCmdShSw82FtJp1SAO0j+CbZ5ywYAQNl0n0dL1mCju/prCU2UYjvP11SvbQaaksf+ zGaKbO58R1pRDKSBcSULq3ARnLsTUCAkkv7dP9wULsIIUfAvGfKMO5lzz6Rta4O2g6 qU5Ubqqe5mJFeXh7DN68rvJ3LJ7fVVm4GptPh63UVMj+R41LTk5Cw0jJk9gsulOiLe adHAyF5rHlDWyFbdaUSYg765JLHfYFZQQhezgPCDRKC23mQ1KO6XE0IF/Or/vpvpSU XDwzhlVzWv7R12Fg47fVz2LsVQSW2mE/erJy8mgZU19HFYsfqEUusVWOLlohbpnmZi fqxG3M4AwrZyA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jakub Kicinski , "David S . Miller" , Sasha Levin , tanghui20@huawei.com, arnd@arndb.de, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.16 034/217] amd: lance: use eth_hw_addr_set() Date: Mon, 17 Jan 2022 21:16:37 -0500 Message-Id: <20220118021940.1942199-34-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 0222ee53c483df7572eea7ba8585dda59328d46e ] IO reads, so save to an array then eth_hw_addr_set(). Fixes build on x86 (32bit). Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/amd/lance.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amd/lance.c b/drivers/net/ethernet/amd/lance.c index 945bf1d875072..462016666752c 100644 --- a/drivers/net/ethernet/amd/lance.c +++ b/drivers/net/ethernet/amd/lance.c @@ -480,6 +480,7 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int unsigned long flags; int err = -ENOMEM; void __iomem *bios; + u8 addr[ETH_ALEN]; /* First we look for special cases. Check for HP's on-board ethernet by looking for 'HP' in the BIOS. @@ -541,7 +542,8 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int /* There is a 16 byte station address PROM at the base address. The first six bytes are the station address. */ for (i = 0; i < 6; i++) - dev->dev_addr[i] = inb(ioaddr + i); + addr[i] = inb(ioaddr + i); + eth_hw_addr_set(dev, addr); printk("%pM", dev->dev_addr); dev->base_addr = ioaddr; -- 2.34.1