From patchwork Fri Jun 17 20:33:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 12886028 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 2F700C43334 for ; Fri, 17 Jun 2022 20:56:00 +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=jcdcn4XLP5vlbuagzpg3TBDxyH49HwrlDL5tEh0W2Vc=; b=q3qsLg5xPwO2wX Sz+4vmrcY8HD4u+1jVjBBS18kZxopc+swVI/eTSN63TxJMzv6p7miOsLUs2+U0gle8+QrvdkjgROo nnM2XlvAhU2uVUaX/dLVLl0CwX61nmvy0T9LY/EbaWI4iPj6snmvHf4tjHVVOcSUAz6beE0lRKShR o1VamIhAG+ww+L1adfx9RIFyRQn6pWkyoILWHLS08Dv09xj5E7H3Rubq3GFSDIYv+TXlCMfFLJoB0 ShOnjxixYjwp+PmAtFSdBxs0LP3JLzaZBSInJGh21QeArIA6NqFgAFc660bARN0CDavtzQqMRaID4 B2NzZBE1ZJ6xT6YPYbtw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2Iyy-0094kf-8a; Fri, 17 Jun 2022 20:54:20 +0000 Received: from mail-db5eur01on060f.outbound.protection.outlook.com ([2a01:111:f400:fe02::60f] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2Ifn-008xNk-F5 for linux-arm-kernel@lists.infradead.org; Fri, 17 Jun 2022 20:34:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CuD2uTDDxAeMIkk7P8/TcTXqVjsQltgOObX/DeRKkGgRQFGJ9H4lK+ATYUKk+9zGjuOMvokG3Mz0dtixfzOIFxoej8SALnsJWcSZKTvuSJK3nfKBoZ68DvTr/3Vx+w00+zeMx7dSDFqTM4qFLGNi8PZDUgaOY8ym2IZ2XLfI1nKsi9jUnwiBy+SzIohM4sJRmxZ40RLi+BoRCSccdGcGnz27iiYBjWfXfukshuwIN0O787WS/swMa019GM4lrRAta5KqIRTxK1eSHqECcC/x5YUudD9wHIgeMSO8h5IZZJU+H3vaq1f6xG7ug3d9w2Rgrosipftemzs2LHX7ls+DCg== 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=wQXApiIb94gYMeEkQjb9lf3tpQFZ+5mR6l2VgM1pkI4=; b=oSsnntycE39OMY1m279KNDSzxYucbLHkOI9rABTm+vEz+C/C4scFeYgP3w+OlSgS3050GllGEUIHWGlUuvdEY+j8ySgLTuf4yi1AfaOr8lCt7wRDB2ovR1lM2jijWI7Mwtm6A+OFeQTCmgi9LYFBiDhG0CV2LbsIH8B+d4ZXCszj9bwa8s6uhl8KAmWejfpXh9zLrR1PF/lyY0dqn4lRrQQ0kweXTutKbpvLQT96KfgKe1LQuhoP3+2/xywszH2j0Isd1qc5EEfdFgvAX7Odz5z9Fx/2iytDbk5xTbi09ntR+l+izlPEJcbnrim4zkDjcDkLt3dYesOTvl+Ibjs7PQ== 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=wQXApiIb94gYMeEkQjb9lf3tpQFZ+5mR6l2VgM1pkI4=; b=zQYj5rhpTUimq8Z7DfkTIIqoV+Q1NOMFL6rBt60Wt9bpAXOpeKr1G6ujTOoe2btGg2zZcG05YOcvxXqP+0oVf2Pxp79uVNH4eRR9W8xCtHfKP+YB9HUNl6+q4Usd9sVco0Syce4nS5gBgbwPYlq2NSDNQRvoFB7WOlYADB4KrEncP4bp4VJMC4CLYN00N8unBRrJfsZJDYPdIj7x5jYT0S/UfnEQKJNDCXXJb4I9CGMzzG32Kh9SKGUNrAdRu/U7tc2xF0wXSCZy1UhrDT49UtxkjjHjVsW3vy2NMkGsHj0y9CEQH9pLCrsoufEFY9nawKcyCNEr9T3652w/P7co3g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from VI1PR03MB4973.eurprd03.prod.outlook.com (2603:10a6:803:c5::12) by AS8PR03MB6838.eurprd03.prod.outlook.com (2603:10a6:20b:29b::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16; Fri, 17 Jun 2022 20:34:21 +0000 Received: from VI1PR03MB4973.eurprd03.prod.outlook.com ([fe80::d18f:e481:f1fa:3e8d]) by VI1PR03MB4973.eurprd03.prod.outlook.com ([fe80::d18f:e481:f1fa:3e8d%7]) with mapi id 15.20.5353.016; Fri, 17 Jun 2022 20:34:21 +0000 From: Sean Anderson To: "David S . Miller" , Jakub Kicinski , Madalin Bucur , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Paolo Abeni , Russell King , Eric Dumazet , Sean Anderson Subject: [PATCH net-next 24/28] net: dpaa: Use mac_dev variable in dpaa_netdev_init Date: Fri, 17 Jun 2022 16:33:08 -0400 Message-Id: <20220617203312.3799646-25-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20220617203312.3799646-1-sean.anderson@seco.com> References: <20220617203312.3799646-1-sean.anderson@seco.com> X-ClientProxiedBy: BL1PR13CA0384.namprd13.prod.outlook.com (2603:10b6:208:2c0::29) To VI1PR03MB4973.eurprd03.prod.outlook.com (2603:10a6:803:c5::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fb06326d-9a39-4680-61dc-08da50a0c26f X-MS-TrafficTypeDiagnostic: AS8PR03MB6838:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0uaUhESixR9c8K3i1G9uiKrXox/bezV4ofg/2jnFkCIdHfwE2vX1LYcUjs2kiUCt+PxbjChDZz17DSRyU7agLlk3DEpRcyFSVlKnctz1jL1G/r6dDw8plcbFqPhApXL7QprMI0QI/V7UDLyFpD369x8B1/shPwQRB6fZNrKbmGEcDWoMKnJnkfjpiBzBnP1UAdpEQg1CRY+bKeBM+biNnIn4wljkyevkaaSd1Ibgx/uooTKhrfW1UQF2TPVgz5wekoDHqXQk7IpMzjVQnd2WQMnS/QD1cwV9TReckZyqa6yiOnNo3SVa1T7CZySWrc7vigyaalQd5bzYCSNW1RfY+dShNwuO/CWPg9nhyF/Lm1OhQWHbsb/9olyJX7fp9m3KkIEk/WdB4rCzYkUaIIeorgetYjgKCaCz6Y+J1H6dmq8xgI2Ma4S44atdEOGxKCPU5D/rW/J9GzvEppTnNsAzL2ssawjrDb7CLKukloq8NWn/POk4HXhm6HgpvLZzo9kd/nMzBlK0/FBboZ/8wawzQAa9dR0V0ZbKn6buX+3pw7kGNr8NyvsUEkJ+QIoWV/zF22Iga8GuL2ehP5BlI7XufKSalhxrIVtqQZ4MDjVWXH5UgF/Lqolz2bwjS/FHJYg+aJ0Xx4ns5UlNr3Nsr/hciepeAdjRsN5d37qodJ0oK8Ds1Ot6ohKOPRvEtByj3QFbFfIaelHCtbMUCxX/kBrs1w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR03MB4973.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(366004)(44832011)(2616005)(38100700002)(38350700002)(8936002)(52116002)(26005)(316002)(36756003)(6512007)(2906002)(4326008)(66476007)(6486002)(66556008)(6506007)(5660300002)(107886003)(83380400001)(8676002)(86362001)(186003)(66946007)(6666004)(1076003)(54906003)(110136005)(498600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: R/magzXLFLSMruEULtZF/UbMkOfqDSPzIoYJw97ty5b+LI38t/zoHYHgsYCVWAVreEdkUodm0IHao6GBvrDv8q+08lZJ7X4Sx3IcdKnGfa2u6UDvef+Fh89w5VZJLDgR4uWQ9qLnor2SWHOfgsgq5JG3Fb/rkiPPTmDX6o3bDbqSst4pgoSVJ5JfwzbnSxa2gdgUI4T/379m8FiXAIqqRp4R0+6B0EunncVu9knq9Q9qGeq65JNw9wb0n8ZKR/fEGiDpvkYrY8xtdthGuv2tR8cOdfGzYMPzjIXt+mBRxEwZE6xLMZkr489iUFwxInjWBO8r6Qla4Qd2G+QcdcrS/GrX+PGC27n0FM4QK/XwVT1P2ZUkhU5eG97dvdcZRLFQgER/qhV1xzcUbReTDYvfffoTibXyzdlt+um4w7smCxcJbBPrVqz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2fOgopYXTcloN1ChWZxFnNlZRm1KE8P8k7RXJh/W4iCYNBludpwIp/zt+euJ0PtCtCmtbBg64L20R52hIFvyOI7gsN/1XEHJek9dH+lc0VibvL98lHk2y/Q0z+xfxcLTgu98vDMfPsKB9vL50nFryEsveKjqzVu9BayRFcp87NSti+hgK49ncYShVPb4xMnSC5Zf+5DeTKc19JaewQ85IjtjExPrZgZ1fnND3nJET4OLdGBBwTAv2XAxKwrwsTMkWkNvt8tiA= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb06326d-9a39-4680-61dc-08da50a0c26f X-MS-Exchange-CrossTenant-AuthSource: VI1PR03MB4973.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2022 20:34:21.5602 (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: CsO6pl1K7JSYzPJ12TccOzCV87Vvcf5w9Q9ZGXgtb9txsAZ7EnZvoMs3UFryxiiGVTbEoaGnopThkdhI1dla2g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB6838 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220617_133431_637938_1CCA82F4 X-CRM114-Status: GOOD ( 10.31 ) 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 --- 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 d443d53c4504..9d31fd1d8ad0 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 = priv->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");