From patchwork Wed Jan 26 00:37:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 12724404 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C12A7C5AC75 for ; Wed, 26 Jan 2022 00:40:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=g2j1nDJSNRpydxgEpRgnwjpTmJDCYEAIpiwyr1UvpmU=; b=gAb2gf0i4swVMr 96RLAdsNbV67mzyXfgyFLnX4gn55CSjyb2AiBbqnaWoulXsmecoufLh1XlPOOxmFCSp39Zs+dEeDC 6q9PEMlMyhFv9kBIKA6rB/bW1MVw3TADtjT3O9lsiNUbv67f1fBpet4S7Hw7GCCQEkeVzO8LGolRk Q5QE/mY+OBzheoP3hxvZAz30aHYLZl5EV3q3ipt40fE0zaKMepAvpkIXOlDSVG8q5PDjQDe7unY9I 8vg6fneu+9wWUtXjikHHebZAhw4ksAXZWHGSiMGhsYbSX+EHJIfKfegxstBhdPnuFwomJUExbkj0a 3uLE19D61G9qkBz4xaZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCWKS-009jz5-0p; Wed, 26 Jan 2022 00:38:28 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCWK7-009ju0-Gd for linux-arm-kernel@lists.infradead.org; Wed, 26 Jan 2022 00:38:08 +0000 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 15DBB61511; Wed, 26 Jan 2022 00:38:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DAC1C340ED; Wed, 26 Jan 2022 00:38:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643157486; bh=UYx5U1wg/JjtdQv0R5uX/+FrMhWvP4HtZiJJfP9ep18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qxp2M9TiuL4RSbr1rAIWxoPDu40LvlB1pG8/c5T6OMdFLwylz6g47hcgt+BIJr2Mb 6z8PsaJ/QMwwnBBKnbi1bzy9jow3dC1uhFZlZueeKHtv9ixzb/xonKfsw5ucadYLw+ aNQtw4jnnIPM+Oq4uflnIrZWBZmyBMoYfIYBGLxMh5DP4S7dRYrviIWUo6KTF9phWL EUZHKEPrMohjHYS7ZPHmcq3y86GiNWO7DIpcgGBGW5UWMV3KO+uAiyQZNFv/NBG725 Wemrw2ZOWXQjhQhHeX7f3xDVdYE7VKAXmwIaDNj5ch6v/WTEJzTIfHpVJwazu0+wqg nz9zfs19ehEKQ== From: Jakub Kicinski To: davem@davemloft.net Cc: netdev@vger.kernel.org, dave@thedillows.org, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, Jakub Kicinski Subject: [PATCH net v2 4/6] ethernet: i825xx: don't write directly to netdev->dev_addr Date: Tue, 25 Jan 2022 16:37:59 -0800 Message-Id: <20220126003801.1736586-5-kuba@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220126003801.1736586-1-kuba@kernel.org> References: <20220126003801.1736586-1-kuba@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220125_163807_620627_EEF51FDA X-CRM114-Status: GOOD ( 12.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org netdev->dev_addr is const now. Compile tested rpc_defconfig w/ GCC 8.5. Fixes: adeef3e32146 ("net: constify netdev->dev_addr") Signed-off-by: Jakub Kicinski Reviewed-by: Russell King (Oracle) --- drivers/net/ethernet/i825xx/ether1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/i825xx/ether1.c b/drivers/net/ethernet/i825xx/ether1.c index c612ef526d16..3e7d7c4bafdc 100644 --- a/drivers/net/ethernet/i825xx/ether1.c +++ b/drivers/net/ethernet/i825xx/ether1.c @@ -986,6 +986,7 @@ static int ether1_probe(struct expansion_card *ec, const struct ecard_id *id) { struct net_device *dev; + u8 addr[ETH_ALEN]; int i, ret = 0; ether1_banner(); @@ -1015,7 +1016,8 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id) } for (i = 0; i < 6; i++) - dev->dev_addr[i] = readb(IDPROM_ADDRESS + (i << 2)); + addr[i] = readb(IDPROM_ADDRESS + (i << 2)); + eth_hw_addr_set(dev, addr); if (ether1_init_2(dev)) { ret = -ENODEV;