Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3384282pxb; Mon, 17 Jan 2022 19:13:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwS8VVuPFH4zVJQrQVinbz1YlCjFvu4eCfBt1/Z2bALQVBnPxgUonnWEgX4azkVLZyc3v1B X-Received: by 2002:a17:90b:1e41:: with SMTP id pi1mr28167747pjb.99.1642475634772; Mon, 17 Jan 2022 19:13:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642475634; cv=none; d=google.com; s=arc-20160816; b=KhXbDkhqwAy9yjeDaM5PB6LaBXei9K4vA0X758VebDRD0EWn6s/d2+GR3y3/nkUPFA tyrq1eA8onSOOaDVk9aAyYnIVbTMnW2vNBEUPMuJxe1rCjNqAV9EqkTbUH7nPkAyzJUN CWqSTPlwerWlwBWj3JkkV2wyc3cAZFOONP29gS3Jp1/hTJhyL0raT6mrHEyWosf08IfO B5PEaVucpoctLmxhAWRdDhq0U1/bxA1y9D5HkDQxl+fJ3IOijdXIdP7wGmBL+6OiWuL/ bhUOFjodzD9hh5t2QNgioUFAv17uLgTuoECxDWRcitzMafrtLSSqNnQWCHQLxN9Nwats VHHA== 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=PgZIIAbiv+hmGGN7BzNk3ut4z7ADTzj/kd6fTokrXdI=; b=qYaiwyQ/XLkawHz5bfUD8xd+DfdJQfNjmIftE4SRuVkhUFxrOZTtReiMT7u9S2+whM zr8NQ8dbgRYF9Ei0vp7gdJ7qtfOe22iKF4SxjeNfJeXKV6nMMo+bKHTtgeOrwrUgnKg1 XfEhNRxwISAz14BPBYRNl+OwfuREt3gRwxQlaKETRP5qS2qcFAJeZ9TtnPXG5ZiwIhRh 3Td8NKJ3xqST/5oSxqt7OtRsNHnWrTWhnUQ7ApfIZdes+cbGJSsHzeGft6vsVG4fDFLW KRKNrDX3981IKZfXriyn6qCDdOe2nu+JGd3DkIhMKmBLZdE/Gm4KWu4rAugFqS8vq6YZ xQrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="p16/TXVN"; 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 pc7si1526163pjb.3.2022.01.17.19.13.41; Mon, 17 Jan 2022 19:13:54 -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="p16/TXVN"; 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 S244672AbiARCWz (ORCPT + 99 others); Mon, 17 Jan 2022 21:22:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244990AbiARCWX (ORCPT ); Mon, 17 Jan 2022 21:22:23 -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 9EA76C06175B; Mon, 17 Jan 2022 18:22:22 -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 4F69BB81239; Tue, 18 Jan 2022 02:22:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB96BC36AEB; Tue, 18 Jan 2022 02:22:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642472540; bh=TzeY5kjwuR+907nvx0UXsopJcumuIJtfZTdJBviSCmQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p16/TXVN3fnkqi361UgRXEnkA7i5zdfowynTd5tDCW4wCE1eJuOUrNNrZB/f3G9Le HbYr4Q6PTM1Ke4X2Jw2RtzCbOLwbYI94Gwtg1AFaJnFt0k94+QRSIz9XjXBTi/O9qi yKUVrLuBs08GU3Et4f2uSIGFKsfkPTpij9qux39oxIVB6hHBZl1ccJ8k9xJ7T9MYJX JelVgaI96+13eR6yAUe8sa1Y2s/V/gN5T2dRhHQNhrmIyCArL6G8CoKKEzVILHEf9v bT1uGMLGot2mwpaYQMxl45WxqTPfv0likZL2ao8W8Hst88WdHGESpvEfIRzP7+B+sp 90EeSegHRwMsg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jakub Kicinski , "David S . Miller" , Sasha Levin , jirislaby@kernel.org, u.kleine-koenig@pengutronix.de, sudipm.mukherjee@gmail.com, dmitry.torokhov@gmail.com, deller@gmx.de, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.16 045/217] lasi_82594: use eth_hw_addr_set() Date: Mon, 17 Jan 2022 21:16:48 -0500 Message-Id: <20220118021940.1942199-45-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 5b6d5affd27486ec9152a66df1741cf67782712a ] dev_addr is set from IO reads, passed to an arch-specific helper. Note that the helper never reads it so uninitialized temp is fine. Fixes build on parisc. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/i825xx/lasi_82596.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/i825xx/lasi_82596.c b/drivers/net/ethernet/i825xx/lasi_82596.c index 48e001881c75f..0af70094aba34 100644 --- a/drivers/net/ethernet/i825xx/lasi_82596.c +++ b/drivers/net/ethernet/i825xx/lasi_82596.c @@ -147,6 +147,7 @@ lan_init_chip(struct parisc_device *dev) struct net_device *netdevice; struct i596_private *lp; int retval = -ENOMEM; + u8 addr[ETH_ALEN]; int i; if (!dev->irq) { @@ -167,13 +168,14 @@ lan_init_chip(struct parisc_device *dev) netdevice->base_addr = dev->hpa.start; netdevice->irq = dev->irq; - if (pdc_lan_station_id(netdevice->dev_addr, netdevice->base_addr)) { + if (pdc_lan_station_id(addr, netdevice->base_addr)) { for (i = 0; i < 6; i++) { - netdevice->dev_addr[i] = gsc_readb(LAN_PROM_ADDR + i); + addr[i] = gsc_readb(LAN_PROM_ADDR + i); } printk(KERN_INFO "%s: MAC of HP700 LAN read from EEPROM\n", __FILE__); } + eth_hw_addr_set(netdevice, addr); lp = netdev_priv(netdevice); lp->options = dev->id.sversion == 0x72 ? OPT_SWAP_PORT : 0; -- 2.34.1