From patchwork Fri Sep 2 21:57:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 12964757 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 2174AC6FA83 for ; Fri, 2 Sep 2022 22:07:25 +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=pZQkhsX+B2VPQmO9gQdXh6juC+KOWQXzR00ZEDbSYmw=; b=eW2l487AdacBSI FiD8pQ0Wmmt/PVQwuLxSl67xuX/F6idKu2tUKVAZ4Fs+rdkRaMrVt8mjMKs8HvVt2D+tAR87pxj+j d2/AKp55omkzw7WoK7N2wVqWjkiZpx9eumi4f37rbP6Eyrd7gH3DidHBCgZNTPFT+xmGuY8jYbznf vTvtAbRn092mjHEESzE2fEQnItCuKCRyI75dflHMIYNiSFG/KPQEI078o2+xTT/3DtKnhKoUM/Z+H hbj+Gpld892y5qyRUuuUCh0GQ+m9bH3IygQIL1BFdN3mnJWSVBwtluxQiajxKFpuI4DIevt7LiXXh /BSPkumlCurfjLllQdvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oUEnO-00Bo3J-VE; Fri, 02 Sep 2022 22:05:52 +0000 Received: from mail-eopbgr150089.outbound.protection.outlook.com ([40.107.15.89] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oUEg5-00Bdr6-R9 for linux-arm-kernel@lists.infradead.org; Fri, 02 Sep 2022 21:58:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ExVy7nEZp6FWtE4i8VI/2O01ZlEfEuN6oOx1lE2/mkJXjKDtlClug5lfQY3c95WoiWlzLdgbkXas2tsWzj58OM2t1+Do/HjCMLL3NQ/OVo6PnHA4aXlQ0UBeUYgl9z6n7dN91yXUULwIPXVoVZyYGvn05PwBr/+5ZLTFchItVJqkv8rF2Emye+NsME9A6et3XBqGlJJf5I1iI4RLf230R8rtJJc7quvHlKuymQ0r+uaY3rlmlMPh/byH7vSOkDJScNzzGtxjG69cyKA19TULweax3drQgB8tz9VwHAN12RHSLLdyi5nwBmhXBjQP3Z6NK01Wkn/JnsKXxsg2q12C0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TqJP1HjUKNiOj19I0PtTLzwe2FIfFYUs1TMZxj3zRTY=; b=jVv/sa4NCzHQ0zupqGdfc1xzdZjNM6SiJWE8gmf0N8GXyKGpiG2DaK8Z2axPrepfyQmv/0cKI8dDCVYCVA+FUiTaoJUVcLp1fP19/sNH7pzutxC2qdgasgFHYDLRwH80y5h1hUu04iBcp7+l68Iw0AoiDlijItZeGi+QfrA43yOvKIhbz58YeE3dlElak+ZERyH9RlYURW+NMiVpbp77yLW+vZHNH9Uz5RMQOlDp0Ir4ML/e02UcT+uDyD4/Lesw8w6WiL5GE59SPXH7K6lotyGJprX27G+zl3VLUUHDRR6iFuoShX7vzPjjUsYl0X3HWgy3xG/BhnR7fU7p86jIsw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TqJP1HjUKNiOj19I0PtTLzwe2FIfFYUs1TMZxj3zRTY=; b=m/ToFdIwYu63JzdKmTQdFG2Xdh2nlA2b2FmWgzpSuKLuRAB80USmbQxHeM9WgoU+Cbj74RzVihk9sRs95bY5W+oyjBUL/a3CSQTOaPkTrHB3YdsBmPLHZ48cEGnn6o1FQfs/jvD6oes+szJVF23NnfdxkcBF/UBt4qkx9lwp7G1BJmfQqkg7WHQkpcw2nW80lrzEF0A9WUPSWGhjYRKreGACkuJ65pSfxN1zB2P4cCU437PbwGQKZTyFzRp0obrHw32swEGgAw12uHRMlhUa9wUn/PSGyQMFvOP01FGA9lEvQlexDq667ml+k4wW/0jVh1s8iE8rORsQvPSya9uExw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) by AM6PR03MB4085.eurprd03.prod.outlook.com (2603:10a6:20b:1b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.14; Fri, 2 Sep 2022 21:58:11 +0000 Received: from DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::ecaa:a5a9:f0d5:27a2]) by DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::ecaa:a5a9:f0d5:27a2%4]) with mapi id 15.20.5566.019; Fri, 2 Sep 2022 21:58:11 +0000 From: Sean Anderson To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org Cc: Camelia Groza , Madalin Bucur , linux-kernel@vger.kernel.org (open list), linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, Sean Anderson Subject: [PATCH net-next v5 11/14] net: dpaa: Use mac_dev variable in dpaa_netdev_init Date: Fri, 2 Sep 2022 17:57:33 -0400 Message-Id: <20220902215737.981341-12-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20220902215737.981341-1-sean.anderson@seco.com> References: <20220902215737.981341-1-sean.anderson@seco.com> X-ClientProxiedBy: CH0PR03CA0315.namprd03.prod.outlook.com (2603:10b6:610:118::15) To DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7637fdd6-8897-4dbe-c2d5-08da8d2e3a05 X-MS-TrafficTypeDiagnostic: AM6PR03MB4085:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7W8frS5KKDfntFb6kXWBaMjpzDFGQZvsQzwR+XwpW4j1kEGTnbw2kZdhgnt5JxOycY+xVcsr2V841SQnnSonCFVLclGOeBM5bPDafxCy4brmYvxoNSomk3/PnTnBhEm80PIE8xLu5FQeJ1+7HPDCVaSwuN7MokALzt+xlXy1uot5YZcj1NzpO6y2e4Ye4y7LeTJCySk1FLH9OVjcbq/+Mj29Y74yLjrIpY05nIoXRNuJIusCtdGERHAvrANMkDSpVMj1JiMJN8ubcgk8AeQOlojCxLWRtHjAsXUkZ5EdH9s+zYqMrne6Tk0ijpIwI3P8NhOmAqPP/eOJyAqyfvdFJ9tmBqdY/w83ad8pvY/UUcGZOsU7XnCfNMlK2bhugnYbHk5A6qFSTxhQ3Y2DY1idPvVJKqGvZrSbwgteiiq67iQVDkQhmWKMFS5qC+M3ir6TBa4Zel5jv70iZnDCGCy/DQVngmZasP0pEB9QNm7VD1JEtSP6hMOBnJJvEmMotMlV9Gy6LXBTGk0mxfB7l3VHpSkBBEI4QyY19WzUPMvOEAQIR06Iyuz6MLLdx3hMgNMuhc2+FzBdIumU1e7DYf8cXfreOWqG5BzaEiFl0Pg1TE6JKev4JAn8kdwvMt6pqWtZoW5lSvN9s4bn7pglQ4FFlHdpJy49bIvilWYHa701h2eXeTiosYmj0BI/n2odR0TVB2+L96Nd21IRvRG5gOJzJpNevh/gBbZf2iF5YeiXxbQv52c7A+8uAlkw4UTVdS5OeMzujK3QSTUJwMvpcBv6qg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR03MB4972.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(39850400004)(136003)(346002)(376002)(396003)(366004)(6506007)(6512007)(26005)(2616005)(186003)(1076003)(7416002)(44832011)(52116002)(8936002)(5660300002)(86362001)(6486002)(41300700001)(6666004)(107886003)(478600001)(83380400001)(36756003)(2906002)(4326008)(8676002)(110136005)(316002)(38350700002)(38100700002)(66476007)(54906003)(66946007)(66556008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: B30O6cme8wh9glCT3CZgZMgv7BuZu7gO+Y57x9qZJD8chVFJeYrWICXeQVnKEMQMVZBjzhWig0rqCam/HKuy6VLvJbLLSBCvpQhujLr2JKs7Qns25FNEIDwqhThHUCajz+iBBB5l+yRizTxJ23q0oo0uNYx8tuiYEYG3e0CVChNshD+zIFbk25qShUZ7c0T7cbkLt+VcVTE7t2QwECNslxjpSTmiHezYY9TKLDd19Uhw2RYMLxJW4lSkvUwSLm1vTRMDC39boECxeVJhuP7/rZN83L+BPB7qSWPLXeQLvoIZ3KE9wRUn9Ieschn7hN1v2RZgNvnY4MqZSSDlO5PxXOOY7Vh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0cWVjok4q13/pWA4AtQ77b723FbX68g+wlfSilhgL5Kty6HpVNVjuzaK5TwLqOKdUgIl2ZTInbb0KymtyEmrFXla8HRyuePFQCSu9mew723Zk8j/QPEeJXkcIk6jNc2zmX60ovONRKbxMGI1hhPYmE1JdQ6W6havjMglrOOyAfh5UaGejbQ== X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7637fdd6-8897-4dbe-c2d5-08da8d2e3a05 X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4972.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2022 21:58:10.9689 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KMRb7fQiRw1u1LY4sLsJ42bHslO5HttgY/OpZHzvCA2OQhz7LBwKYBLb6QFeGnprq9VkAcjXfCjxI8HLYg4U2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB4085 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220902_145817_907112_F5F04843 X-CRM114-Status: GOOD ( 11.34 ) 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 There are several references to mac_dev in dpaa_netdev_init. Make things a bit more concise by adding a local variable for it. Signed-off-by: Sean Anderson Acked-by: Camelia Groza --- (no changes since v4) Changes in v4: - Use mac_dev for calling change_addr drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index d378247a6d0c..7df3bf5a9c03 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -203,6 +203,7 @@ static int dpaa_netdev_init(struct net_device *net_dev, { struct dpaa_priv *priv = netdev_priv(net_dev); struct device *dev = net_dev->dev.parent; + struct mac_device *mac_dev = priv->mac_dev; struct dpaa_percpu_priv *percpu_priv; const u8 *mac_addr; int i, err; @@ -216,10 +217,10 @@ static int dpaa_netdev_init(struct net_device *net_dev, } net_dev->netdev_ops = dpaa_ops; - mac_addr = priv->mac_dev->addr; + mac_addr = mac_dev->addr; - net_dev->mem_start = (unsigned long)priv->mac_dev->vaddr; - net_dev->mem_end = (unsigned long)priv->mac_dev->vaddr_end; + net_dev->mem_start = (unsigned long)mac_dev->vaddr; + net_dev->mem_end = (unsigned long)mac_dev->vaddr_end; net_dev->min_mtu = ETH_MIN_MTU; net_dev->max_mtu = dpaa_get_max_mtu(); @@ -246,7 +247,7 @@ static int dpaa_netdev_init(struct net_device *net_dev, eth_hw_addr_set(net_dev, mac_addr); } else { eth_hw_addr_random(net_dev); - err = priv->mac_dev->change_addr(priv->mac_dev->fman_mac, + err = mac_dev->change_addr(mac_dev->fman_mac, (const enet_addr_t *)net_dev->dev_addr); if (err) { dev_err(dev, "Failed to set random MAC address\n");