From patchwork Wed Jan 26 00:38:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 12724409 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 E3647C5AC75 for ; Wed, 26 Jan 2022 00:40:57 +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=AgiLiMZp3PkN1NFaZ8DABU/iH5PfTeUr49EPQ0cGfLM=; b=BoJCQ8E/0Y4HzK e3oYXoTINlBMvdSBBewtdKpqmGs7/KBFv73G8cg8ml2lUSJd6vNTAku580RIKGh3w/6TK1LoH7WTR d5QKhS6l5AZ7jOdGWULmlA0PFRERlzEMuzIWSQjehok4zw/7z7nrpEjen+JtD4pYF5gzAIL5hK7Fh pAPeP7vIl1xgQuMPadDNhLt550mrmS5wfus6IFPlMTogto09rJQhllTTYwWhw/LtWJ/pBK3PnX6rW DePy0QgRRbMNz5Ss1VpAP7v14ex5ZoVrOEErbHTJYSrKUX1InuxuyR+h2ut08RqePMpQ/ZP+N0pbr J7B2wSPruy2jzNEUl7rQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCWL9-009kDR-ME; Wed, 26 Jan 2022 00:39:11 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCWK8-009juz-B0 for linux-arm-kernel@lists.infradead.org; Wed, 26 Jan 2022 00:38:11 +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 E7CFE614E7; Wed, 26 Jan 2022 00:38:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D8FDC340EB; Wed, 26 Jan 2022 00:38:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643157487; bh=XIKhWG/yrRc9acbEBo5t9YJGBTtlszI2HeaFhi/4TRM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OgdxwivgzWmvyidgBjcRhuuUBPsgDyZ8GbOsoixEo4N6pOiXvFuVfjDYQX8sKQ8+X ws9La5cpfAd8hVymz440zUtGLWHxVcNcfCbUAbxR7FeiBjB7KcNpY1aFcay9c8PFc8 ie9NtI1mb7apCkZCi8Lnkopu/VEVRHv4LE6yM4R+MuItRfUvUFvhtB0KpEmA6hhpSC dgm87CFAeWoWFlBq0CgIdcGbHWRF1Jzo4TJgKPRtXoJt7WRzAkdNpuMFNlaJ8NcDJ0 tvMXz98xY0l9FD/RI4rzO2gjDc8SAttXvpB7ijkS9pTTlxwJSS8oKSVlz/knkTxQ3B +SeBS4fbIs6NA== 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 6/6] ethernet: seeq/ether3: don't write directly to netdev->dev_addr Date: Tue, 25 Jan 2022 16:38:01 -0800 Message-Id: <20220126003801.1736586-7-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_163808_444192_3E1EF77F X-CRM114-Status: GOOD ( 11.08 ) 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/seeq/ether3.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/seeq/ether3.c b/drivers/net/ethernet/seeq/ether3.c index 16a4cbae9326..c672f92d65e9 100644 --- a/drivers/net/ethernet/seeq/ether3.c +++ b/drivers/net/ethernet/seeq/ether3.c @@ -749,6 +749,7 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id) const struct ether3_data *data = id->data; struct net_device *dev; int bus_type, ret; + u8 addr[ETH_ALEN]; ether3_banner(); @@ -776,7 +777,8 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id) priv(dev)->seeq = priv(dev)->base + data->base_offset; dev->irq = ec->irq; - ether3_addr(dev->dev_addr, ec); + ether3_addr(addr, ec); + eth_hw_addr_set(dev, addr); priv(dev)->dev = dev; timer_setup(&priv(dev)->timer, ether3_ledoff, 0);