From patchwork Wed Jan 26 00:38:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 12724406 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 481F7C5AC75 for ; Wed, 26 Jan 2022 00:40:26 +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=7BTfEom0AZQ26DcSzQnkrbK7F3CklF6VAmBTQXy090c=; b=L2ZVVIqANPtAy7 W6P2PFHJpdzTh5NNqh5uv3GWJdigwqiW+SHCwdTiHtXxxXiLFwOXTkJgNRiMiR5QWvE3vFhwOHJuh hbMFqMwfhVHTZfZQTKFzK5ntUMGHKEomLMOoq74MOu3Vpk7gF0HvUmx0entBIMZzI2oGYdVHprKTG koH5sdWB2sMCx+7mL+6Nsv8WWKK2mvm3fWvCZ81OxgKFwJkUuf9rYwuRlvFnwrcPSV+Mz3wELjlqb u6al8a/heuQgTi6YTMKieWRRz7nQ1kGwLrFf2YOQmqVFS+9sURXQ8V3eubgIYcZeSkxxqacVBT5B9 Q0deumcEvwGwZeSAdUpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCWKc-009k0R-3G; Wed, 26 Jan 2022 00:38:38 +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-009juc-Tg for linux-arm-kernel@lists.infradead.org; Wed, 26 Jan 2022 00:38:10 +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 7F2A761512; Wed, 26 Jan 2022 00:38:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11975C340EF; 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=LnVgHwnzz6kGeN/ldDgS21isdYgANJXvfysLOD9AdlM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cX1ybcKxR5AH7p62um6KGGPuqGN+7INBYDJRxyz95bCX/AM/0QWh3DZIF3a1X5Ciz 8EaJd53F8f+2Ia+F1k1HYsOQg97F6VY1CEQKij6WYUlGFClYYD8rf04fEkOtVsWF+L /y0q7q0FisHyUfW7PSZYgzZA1fDg551Vs+/2ksG3//R3LwSj5CgTVe49hJwfVD55in XyNRt8OkAkpnVTub76iDKPBpouxoStnfmIniX8q1WTHrUkLqX+Dj3D+9h/ltq1a+Jk ZUoKZeKuyWs16xy258fX4RjIetmgR9g7n/66fz4zlyHv9+jjuD3G0wMJVR/ooemAJf vLZIkBSRCR/vg== 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 5/6] ethernet: 8390/etherh: don't write directly to netdev->dev_addr Date: Tue, 25 Jan 2022 16:38:00 -0800 Message-Id: <20220126003801.1736586-6-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_014313_B23ADD2A X-CRM114-Status: GOOD ( 11.30 ) 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/8390/etherh.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/8390/etherh.c b/drivers/net/ethernet/8390/etherh.c index bd22a534b1c0..e7b879123bb1 100644 --- a/drivers/net/ethernet/8390/etherh.c +++ b/drivers/net/ethernet/8390/etherh.c @@ -655,6 +655,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) struct ei_device *ei_local; struct net_device *dev; struct etherh_priv *eh; + u8 addr[ETH_ALEN]; int ret; ret = ecard_request_resources(ec); @@ -724,12 +725,13 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) spin_lock_init(&ei_local->page_lock); if (ec->cid.product == PROD_ANT_ETHERM) { - etherm_addr(dev->dev_addr); + etherm_addr(addr); ei_local->reg_offset = etherm_regoffsets; } else { - etherh_addr(dev->dev_addr, ec); + etherh_addr(addr, ec); ei_local->reg_offset = etherh_regoffsets; } + eth_hw_addr_set(dev, addr); ei_local->name = dev->name; ei_local->word16 = 1;