From patchwork Wed Dec 29 03:22:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12700728 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 365F7C433FE for ; Wed, 29 Dec 2021 03:23:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238551AbhL2DW7 (ORCPT ); Tue, 28 Dec 2021 22:22:59 -0500 Received: from mail-bn8nam08on2138.outbound.protection.outlook.com ([40.107.100.138]:18785 "EHLO NAM04-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238529AbhL2DWy (ORCPT ); Tue, 28 Dec 2021 22:22:54 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PGxm6s+eCX5RvDQcwlerWnJ3Iz8YVkKpQdybCI6EnO+/NUKGnZLtdOeLKT8berw3ql4y+L8GfbT5EzrCJIV+mnaUC2/0l76wvl/LXgaKXYIrYoR3iDazyMnFBpwl2QW0vU3s31LWql89ZWTbNr4Ta+Ce/Iqr4+3OLLxlWrXjNaRJ7UxtIuinM4YE8M4K0EAoy0ECjC99P/wag1r1DkEwBpvEx0UDiVJI9hX8o90JUodbFsoNjYb7XY6Mu0dYQapHMOaF9ufQuypZfObugvNTlqQKVEVH05RpY82M8oFBJOTY5TjDBBwCykBQOmJLZD4nAD3f0niVWy0vT8TqIft1+A== 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=h29CRPV94sbHRd/acWO2E1VuldLYFtATwdpJhqOjDWk=; b=TpDB2sfO/DAhT+ZBnJ+16fOFBUAZP6pjDPlIaFHkvZd3r7iUS72uud8osYICKVj1TObO2J2QqTwBLTtNWzQJ/XttkoFFdYwY7ytNfmp6Vag/VnRrs11b/nkTPzo/z3U2fbOKJVw/qYiN9ofYbCcOVMaveMZfvqsk1L4JiSIOH9yzZ2k+d6Za2cJTnqH8rZ0VzPFkhFiNPoFE8gmEMZ/LY1nC3VvytAAb5er+7lPZDjVAnFbbyficYZgsquIuOfb7rL2WgC3ksLhpCvAeAs0s5fL8yH0LY7A3nlAf0ykpLomn92R3H60h2N38SpLMbX4hTBOWQvH+bJmFYVdQ9GIz5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=in-advantage.com; dmarc=pass action=none header.from=in-advantage.com; dkim=pass header.d=in-advantage.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h29CRPV94sbHRd/acWO2E1VuldLYFtATwdpJhqOjDWk=; b=Re7GxQ/utd+AImOyPyiSbnkMlQ526ftqaxgvUQWYnayOiQlmiU08cpOcVn+oJoMBrwKiN94fKMISIrgbf9B+bac6atEvcBgFUpjMgA7kIAufZBqrMZHxrJIJAITmaobCya/f1pUNFhlM+XDKZVxvx5x4WejDRmjzU4SFfTPePAM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) by CO1PR10MB5521.namprd10.prod.outlook.com (2603:10b6:303:160::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.18; Wed, 29 Dec 2021 03:22:48 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::2d52:2a96:7e6c:460f]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::2d52:2a96:7e6c:460f%4]) with mapi id 15.20.4823.024; Wed, 29 Dec 2021 03:22:48 +0000 From: Colin Foster To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Russell King , Heiner Kallweit , Ioana Ciornei , Jakub Kicinski , "David S. Miller" , Florian Fainelli , Vivien Didelot , Andrew Lunn , UNGLinuxDriver@microchip.com, Alexandre Belloni , Claudiu Manoil , Vladimir Oltean Subject: [PATCH v1 net-next 1/5] net: phy: lynx: refactor Lynx PCS module to use generic phylink_pcs Date: Tue, 28 Dec 2021 19:22:33 -0800 Message-Id: <20211229032237.912649-2-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211229032237.912649-1-colin.foster@in-advantage.com> References: <20211229032237.912649-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MWHPR14CA0015.namprd14.prod.outlook.com (2603:10b6:300:ae::25) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e1ac0220-c1c4-47ac-ebcb-08d9ca7a7d34 X-MS-TrafficTypeDiagnostic: CO1PR10MB5521:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:172; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EKoGh6CkLq+H59ivxfqlAMg1jMIJmlvYwRiPamLmGi9BeZIaQ3dN2d8zdk8O6UBkf9MesOnXjuS7uBTXlggodnmXL9AhoI5TABZmCW4So/E+ztJWRL01z3jvjBTQtzy8WC18K2fx7xSMPzX9wz0uRSp3MleeMhfURAFkYahaI0C25gsUPDMP5Pf7zZBGN2E5d3oQrhlhoYN86+I4qOj7mNKufVAOkoW0FToDh6GBdBe15DfZIq2rPTTpNmz3Vmm7BdynZLQIHJA9rnrXuxiXfghSJvyvgzFAQVqKibUAchDGNgSCS5ZSdccAAUWiUEihDA0UzoYEF8BbKgDxT2EUDX3/mjUhBMvhr5YfrSA6bfktb4xwmkYAorRlBSAen79VfF5MUy/jq9gmDnw/tXSuW1itebThnChluLyj990jOjlCQISg8weyAwVHrGj8txAGhpKke4MsHAU/i+zE2OBKBZmSDo23kna27rmCsXo2RYMjdtm3kcKmB2hK0gUli67pN0lIOKCYr3Tk6WrEMoEysY1vx0yg6+TEyjxBlwHVaCZfWcFivUiXCuGFdukyoOMIEYzF5b244RnAQEf7SLl6W64Um6Dk7yiHVgBro5WHXfW/YZ14fTLmqOrGFUw8Am+59pNZGRIW1o5n0G3pUy/7VG6JlF4IezrkpLWkNuy/scyb0V4GjeWXuVuUaXoqf1gT0Nv3SN0Li1nSt6ilUfK7+UICBNcc7qtkPBWiitoxacc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2351.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(346002)(136003)(42606007)(376002)(396003)(366004)(39830400003)(6666004)(316002)(66946007)(186003)(8676002)(4326008)(2616005)(2906002)(6512007)(44832011)(30864003)(83380400001)(26005)(6506007)(508600001)(1076003)(86362001)(54906003)(5660300002)(8936002)(38100700002)(38350700002)(52116002)(66556008)(66476007)(6486002)(7416002)(36756003)(41533002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hE5iBMoEoPKZI6R1hrReQuTxEBS5ulCfrcgSVzbYqK+YA42FJqdVaf/V//SKmvkdIii/oJT/2zELC2vLxG8mK7XVpLYBoJejW46PhlYyqEhE82CjnPjoiLtPxj6rUVfuCNg0fJwL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pXNRXca3cwuna04iyTk68/8ctaTRQ3+qduaCgGOoBBhoM4En7CjzWt2OtTOi25cre/Oi3qCmE6zA33t2olMpTkQShE2fGrHplohpqb9xru0YNRyqGrb8IdpnzFDZrU+7xGGDW58Lm/MqNf/6RGTOrtzwrsiQu0H+DhJNO7OyMv3G3U6s5P0SlbjMmIzidHGFI5Y1DX8AUhSzVkSnHRENQyObEr/P03WnHUMdrpTfmvjcmnZY8PxARE3LPeZIWTA2SPA9wW+hDp9SG1XgmuwMoFiQjTiLGAUau9H9aortCht6eGpFGfKUwyrOwAP1zuNBJ7eF8Fc5qKzQH5sTNn5T/hFnGAT4rjTFvCj9iuCf60D5OuxCcRvU8F5WTa2Bjl1W2xOoQIbShReUXJ3pt5dZDfm+RVkpOG3uD4FEVeQ8OANafUp1RIo625PK4/wCc4mI4HZz34gww== X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1ac0220-c1c4-47ac-ebcb-08d9ca7a7d34 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2021 03:22:48.6951 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gPcTSYazJHH3wIjNXrjPA4cOcKnTUcSFge3UhTU7U5GpzPs3bwNwCLUr24ZjpYFH5L+c6THP78tZKhmfRxASzIYlPDZ3O98Hy0BdnLQOcUU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB5521 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Remove references to lynx_pcs structures so drivers like the Felix DSA can reference alternate PCS drivers. Signed-off-by: Colin Foster --- drivers/net/dsa/ocelot/felix.c | 3 +-- drivers/net/dsa/ocelot/felix.h | 2 +- drivers/net/dsa/ocelot/felix_vsc9959.c | 20 +++++++++------- drivers/net/dsa/ocelot/seville_vsc9953.c | 22 +++++++++-------- .../net/ethernet/freescale/dpaa2/dpaa2-mac.c | 12 ++++++---- .../net/ethernet/freescale/dpaa2/dpaa2-mac.h | 3 +-- .../net/ethernet/freescale/enetc/enetc_pf.c | 15 +++++++----- .../net/ethernet/freescale/enetc/enetc_pf.h | 4 ++-- drivers/net/pcs/pcs-lynx.c | 24 +++++++++++++++---- include/linux/pcs-lynx.h | 9 +++---- 10 files changed, 67 insertions(+), 47 deletions(-) diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c index f4fc403fbc1e..bb2a43070ea8 100644 --- a/drivers/net/dsa/ocelot/felix.c +++ b/drivers/net/dsa/ocelot/felix.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include "felix.h" @@ -832,7 +831,7 @@ static void felix_phylink_mac_config(struct dsa_switch *ds, int port, struct dsa_port *dp = dsa_to_port(ds, port); if (felix->pcs && felix->pcs[port]) - phylink_set_pcs(dp->pl, &felix->pcs[port]->pcs); + phylink_set_pcs(dp->pl, felix->pcs[port]); } static void felix_phylink_mac_link_down(struct dsa_switch *ds, int port, diff --git a/drivers/net/dsa/ocelot/felix.h b/drivers/net/dsa/ocelot/felix.h index 515bddc012c0..9395ac119d33 100644 --- a/drivers/net/dsa/ocelot/felix.h +++ b/drivers/net/dsa/ocelot/felix.h @@ -62,7 +62,7 @@ struct felix { const struct felix_info *info; struct ocelot ocelot; struct mii_bus *imdio; - struct lynx_pcs **pcs; + struct phylink_pcs **pcs; resource_size_t switch_base; resource_size_t imdio_base; enum dsa_tag_protocol tag_proto; diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c index 4ffd303c64ea..93ad1d65e212 100644 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -1039,7 +1039,7 @@ static int vsc9959_mdio_bus_alloc(struct ocelot *ocelot) int rc; felix->pcs = devm_kcalloc(dev, felix->info->num_ports, - sizeof(struct lynx_pcs *), + sizeof(struct phylink_pcs *), GFP_KERNEL); if (!felix->pcs) { dev_err(dev, "failed to allocate array for PCS PHYs\n"); @@ -1088,8 +1088,8 @@ static int vsc9959_mdio_bus_alloc(struct ocelot *ocelot) for (port = 0; port < felix->info->num_ports; port++) { struct ocelot_port *ocelot_port = ocelot->ports[port]; + struct phylink_pcs *phylink_pcs; struct mdio_device *pcs; - struct lynx_pcs *lynx; if (dsa_is_unused_port(felix->ds, port)) continue; @@ -1101,13 +1101,13 @@ static int vsc9959_mdio_bus_alloc(struct ocelot *ocelot) if (IS_ERR(pcs)) continue; - lynx = lynx_pcs_create(pcs); - if (!lynx) { + phylink_pcs = lynx_pcs_create(pcs); + if (!phylink_pcs) { mdio_device_free(pcs); continue; } - felix->pcs[port] = lynx; + felix->pcs[port] = phylink_pcs; dev_info(dev, "Found PCS at internal MDIO address %d\n", port); } @@ -1121,13 +1121,15 @@ static void vsc9959_mdio_bus_free(struct ocelot *ocelot) int port; for (port = 0; port < ocelot->num_phys_ports; port++) { - struct lynx_pcs *pcs = felix->pcs[port]; + struct phylink_pcs *phylink_pcs = felix->pcs[port]; + struct mdio_device *mdio_device; - if (!pcs) + if (!phylink_pcs) continue; - mdio_device_free(pcs->mdio); - lynx_pcs_destroy(pcs); + mdio_device = lynx_get_mdio_device(phylink_pcs); + mdio_device_free(mdio_device); + lynx_pcs_destroy(phylink_pcs); } mdiobus_unregister(felix->imdio); } diff --git a/drivers/net/dsa/ocelot/seville_vsc9953.c b/drivers/net/dsa/ocelot/seville_vsc9953.c index e110550e3507..d34d0f737c16 100644 --- a/drivers/net/dsa/ocelot/seville_vsc9953.c +++ b/drivers/net/dsa/ocelot/seville_vsc9953.c @@ -1012,7 +1012,7 @@ static int vsc9953_mdio_bus_alloc(struct ocelot *ocelot) int rc; felix->pcs = devm_kcalloc(dev, felix->info->num_ports, - sizeof(struct phy_device *), + sizeof(struct phylink_pcs *), GFP_KERNEL); if (!felix->pcs) { dev_err(dev, "failed to allocate array for PCS PHYs\n"); @@ -1039,9 +1039,9 @@ static int vsc9953_mdio_bus_alloc(struct ocelot *ocelot) for (port = 0; port < felix->info->num_ports; port++) { struct ocelot_port *ocelot_port = ocelot->ports[port]; - int addr = port + 4; + struct phylink_pcs *phylink_pcs; struct mdio_device *pcs; - struct lynx_pcs *lynx; + int addr = port + 4; if (dsa_is_unused_port(felix->ds, port)) continue; @@ -1053,13 +1053,13 @@ static int vsc9953_mdio_bus_alloc(struct ocelot *ocelot) if (IS_ERR(pcs)) continue; - lynx = lynx_pcs_create(pcs); - if (!lynx) { + phylink_pcs = lynx_pcs_create(pcs); + if (!phylink_pcs) { mdio_device_free(pcs); continue; } - felix->pcs[port] = lynx; + felix->pcs[port] = phylink_pcs; dev_info(dev, "Found PCS at internal MDIO address %d\n", addr); } @@ -1073,13 +1073,15 @@ static void vsc9953_mdio_bus_free(struct ocelot *ocelot) int port; for (port = 0; port < ocelot->num_phys_ports; port++) { - struct lynx_pcs *pcs = felix->pcs[port]; + struct phylink_pcs *phylink_pcs = felix->pcs[port]; + struct mdio_device *mdio_device; - if (!pcs) + if (!phylink_pcs) continue; - mdio_device_free(pcs->mdio); - lynx_pcs_destroy(pcs); + mdio_device = lynx_get_mdio_device(phylink_pcs); + mdio_device_free(mdio_device); + lynx_pcs_destroy(phylink_pcs); } mdiobus_unregister(felix->imdio); } diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c index 34b2a73c347f..fa999996c597 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c @@ -204,11 +204,13 @@ static int dpaa2_pcs_create(struct dpaa2_mac *mac, static void dpaa2_pcs_destroy(struct dpaa2_mac *mac) { - struct lynx_pcs *pcs = mac->pcs; + struct phylink_pcs *phylink_pcs = mac->pcs; - if (pcs) { - struct device *dev = &pcs->mdio->dev; - lynx_pcs_destroy(pcs); + if (phylink_pcs) { + struct mdio_device *mdio = lynx_get_mdio_device(phylink_pcs); + struct device *dev = &mdio->dev; + + lynx_pcs_destroy(phylink_pcs); put_device(dev); mac->pcs = NULL; } @@ -292,7 +294,7 @@ int dpaa2_mac_connect(struct dpaa2_mac *mac) mac->phylink = phylink; if (mac->pcs) - phylink_set_pcs(mac->phylink, &mac->pcs->pcs); + phylink_set_pcs(mac->phylink, mac->pcs); err = phylink_fwnode_phy_connect(mac->phylink, dpmac_node, 0); if (err) { diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h index 7842cbb2207a..1331a8477fe4 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h @@ -7,7 +7,6 @@ #include #include #include -#include #include "dpmac.h" #include "dpmac-cmd.h" @@ -23,7 +22,7 @@ struct dpaa2_mac { struct phylink *phylink; phy_interface_t if_mode; enum dpmac_link_type if_link_type; - struct lynx_pcs *pcs; + struct phylink_pcs *pcs; struct fwnode_handle *fw_node; }; diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf.c b/drivers/net/ethernet/freescale/enetc/enetc_pf.c index fe6a544f37f0..38b285871249 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c @@ -828,7 +828,7 @@ static int enetc_imdio_create(struct enetc_pf *pf) { struct device *dev = &pf->si->pdev->dev; struct enetc_mdio_priv *mdio_priv; - struct lynx_pcs *pcs_lynx; + struct phylink_pcs *phylink_pcs; struct mdio_device *pcs; struct mii_bus *bus; int err; @@ -860,8 +860,8 @@ static int enetc_imdio_create(struct enetc_pf *pf) goto unregister_mdiobus; } - pcs_lynx = lynx_pcs_create(pcs); - if (!pcs_lynx) { + phylink_pcs = lynx_pcs_create(pcs); + if (!phylink_pcs) { mdio_device_free(pcs); err = -ENOMEM; dev_err(dev, "cannot create lynx pcs (%d)\n", err); @@ -869,7 +869,7 @@ static int enetc_imdio_create(struct enetc_pf *pf) } pf->imdio = bus; - pf->pcs = pcs_lynx; + pf->pcs = phylink_pcs; return 0; @@ -882,8 +882,11 @@ static int enetc_imdio_create(struct enetc_pf *pf) static void enetc_imdio_remove(struct enetc_pf *pf) { + struct mdio_device *mdio_device; + if (pf->pcs) { - mdio_device_free(pf->pcs->mdio); + mdio_device = lynx_get_mdio_device(pf->pcs); + mdio_device_free(mdio_device); lynx_pcs_destroy(pf->pcs); } if (pf->imdio) { @@ -941,7 +944,7 @@ static void enetc_pl_mac_config(struct phylink_config *config, priv = netdev_priv(pf->si->ndev); if (pf->pcs) - phylink_set_pcs(priv->phylink, &pf->pcs->pcs); + phylink_set_pcs(priv->phylink, &pf->pcs); } static void enetc_force_rgmii_mac(struct enetc_hw *hw, int speed, int duplex) diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf.h b/drivers/net/ethernet/freescale/enetc/enetc_pf.h index 263946c51e37..c26bd66e4597 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_pf.h +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.h @@ -2,7 +2,7 @@ /* Copyright 2017-2019 NXP */ #include "enetc.h" -#include +#include #define ENETC_PF_NUM_RINGS 8 @@ -46,7 +46,7 @@ struct enetc_pf { struct mii_bus *mdio; /* saved for cleanup */ struct mii_bus *imdio; - struct lynx_pcs *pcs; + struct phylink_pcs *pcs; phy_interface_t if_mode; struct phylink_config phylink_config; diff --git a/drivers/net/pcs/pcs-lynx.c b/drivers/net/pcs/pcs-lynx.c index af36cd647bf5..7ff7f86ad430 100644 --- a/drivers/net/pcs/pcs-lynx.c +++ b/drivers/net/pcs/pcs-lynx.c @@ -22,6 +22,11 @@ #define IF_MODE_SPEED_MSK GENMASK(3, 2) #define IF_MODE_HALF_DUPLEX BIT(4) +struct lynx_pcs { + struct phylink_pcs pcs; + struct mdio_device *mdio; +}; + enum sgmii_speed { SGMII_SPEED_10 = 0, SGMII_SPEED_100 = 1, @@ -30,6 +35,15 @@ enum sgmii_speed { }; #define phylink_pcs_to_lynx(pl_pcs) container_of((pl_pcs), struct lynx_pcs, pcs) +#define lynx_to_phylink_pcs(lynx) (&(lynx)->pcs) + +struct mdio_device *lynx_get_mdio_device(struct phylink_pcs *pcs) +{ + struct lynx_pcs *lynx = phylink_pcs_to_lynx(pcs); + + return lynx->mdio; +} +EXPORT_SYMBOL(lynx_get_mdio_device); static void lynx_pcs_get_state_usxgmii(struct mdio_device *pcs, struct phylink_link_state *state) @@ -329,7 +343,7 @@ static const struct phylink_pcs_ops lynx_pcs_phylink_ops = { .pcs_link_up = lynx_pcs_link_up, }; -struct lynx_pcs *lynx_pcs_create(struct mdio_device *mdio) +struct phylink_pcs *lynx_pcs_create(struct mdio_device *mdio) { struct lynx_pcs *lynx_pcs; @@ -341,13 +355,15 @@ struct lynx_pcs *lynx_pcs_create(struct mdio_device *mdio) lynx_pcs->pcs.ops = &lynx_pcs_phylink_ops; lynx_pcs->pcs.poll = true; - return lynx_pcs; + return lynx_to_phylink_pcs(lynx_pcs); } EXPORT_SYMBOL(lynx_pcs_create); -void lynx_pcs_destroy(struct lynx_pcs *pcs) +void lynx_pcs_destroy(struct phylink_pcs *pcs) { - kfree(pcs); + struct lynx_pcs *lynx = phylink_pcs_to_lynx(pcs); + + kfree(lynx); } EXPORT_SYMBOL(lynx_pcs_destroy); diff --git a/include/linux/pcs-lynx.h b/include/linux/pcs-lynx.h index a6440d6ebe95..5712cc2ce775 100644 --- a/include/linux/pcs-lynx.h +++ b/include/linux/pcs-lynx.h @@ -9,13 +9,10 @@ #include #include -struct lynx_pcs { - struct phylink_pcs pcs; - struct mdio_device *mdio; -}; +struct mdio_device *lynx_get_mdio_device(struct phylink_pcs *pcs); -struct lynx_pcs *lynx_pcs_create(struct mdio_device *mdio); +struct phylink_pcs *lynx_pcs_create(struct mdio_device *mdio); -void lynx_pcs_destroy(struct lynx_pcs *pcs); +void lynx_pcs_destroy(struct phylink_pcs *pcs); #endif /* __LINUX_PCS_LYNX_H */ From patchwork Wed Dec 29 03:22:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12700725 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FE51C433F5 for ; Wed, 29 Dec 2021 03:22:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238533AbhL2DWz (ORCPT ); Tue, 28 Dec 2021 22:22:55 -0500 Received: from mail-bn8nam08on2138.outbound.protection.outlook.com ([40.107.100.138]:18785 "EHLO NAM04-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233058AbhL2DWx (ORCPT ); Tue, 28 Dec 2021 22:22:53 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OWL08LsP36ZgpJF7kEIzWcHvlrHYCdJK4bv1KH9Rq4KHCZRQfPLdmheLM4fvcjI7Y1LOVlfqYVJpYle01uL7r+5CQQsMTpDekV36DRigvzhALAyDnt3CyTwru5PCrN0AdLhNbPEZRgCjjkRK2R2BRVgPuGrAs/WQUA3c5/zJNbdO7836DNfC1wKzCrzICPH6yjQjIrXF4xrYRyxl18zNZRve8qngzfUW+6TzkCg697/5TMCizhK/BZezNlsCxYgbD/B45x9Kx0iayLq84UaCw6+tVElEt/W8c0UyGUK/4wNqeRZuRWuhvoIIItlQM+1WSBlduFb5x8btLFGhlfSscw== 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=nxp44wy/vkVOsA6JwbYdAYpKJJeRm9GLNLloxAuFrYk=; b=Pq4el0nqFEWpZMxlDEXMC/gECN9IQRuKdLnyEv/RJnaWjzt6FSO1Q4KbfifzATLKE12r/RC1ZuoOS9ZuAULceYtQtUrv6Hfyjx6tgisU+B0VibVKv8s7SFbCFsdXE3sQPb73Osk/yLgWvVCPlUhHy3J09c9TnrZAaIh27cK+dxHOr1nQgvVO3Oi2salrnalgmD66mhDeq81LATPI68ah5ykR/YdNe9HY919VkWH36Rf/XDVn9T/5iuZBpiQ32zyIItm70NDJnSjR3PqLTI4AOeLhTxvazi+KqGhSEh0nu/z3nTggzOlXJ2GgCkr/+ehY5Zrr1TCRdYZlWnLalomvlg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=in-advantage.com; dmarc=pass action=none header.from=in-advantage.com; dkim=pass header.d=in-advantage.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nxp44wy/vkVOsA6JwbYdAYpKJJeRm9GLNLloxAuFrYk=; b=O0H0J+qnxbGHf3agN5wdSEkS0EZQ7bYhIK7heD1U5duJXukhld/784nNIT3fXCjQsYhLHbZTOxyeYZZNkT2kkZ4C2pz+wjjA0AWksk9ort2Rb5RpZZg0DAgtQtF+0nSF41vcRzAil+Jul0bQNxZ4gWn1S2zdcZ9nOpcPBv/qqZg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) by CO1PR10MB5521.namprd10.prod.outlook.com (2603:10b6:303:160::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.18; Wed, 29 Dec 2021 03:22:49 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::2d52:2a96:7e6c:460f]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::2d52:2a96:7e6c:460f%4]) with mapi id 15.20.4823.024; Wed, 29 Dec 2021 03:22:49 +0000 From: Colin Foster To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Russell King , Heiner Kallweit , Ioana Ciornei , Jakub Kicinski , "David S. Miller" , Florian Fainelli , Vivien Didelot , Andrew Lunn , UNGLinuxDriver@microchip.com, Alexandre Belloni , Claudiu Manoil , Vladimir Oltean Subject: [PATCH v1 net-next 2/5] net: dsa: felix: name change for clarity from pcs to mdio_device Date: Tue, 28 Dec 2021 19:22:34 -0800 Message-Id: <20211229032237.912649-3-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211229032237.912649-1-colin.foster@in-advantage.com> References: <20211229032237.912649-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MWHPR14CA0015.namprd14.prod.outlook.com (2603:10b6:300:ae::25) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 99fcc300-b96b-4ea1-0cc9-08d9ca7a7d99 X-MS-TrafficTypeDiagnostic: CO1PR10MB5521:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1091; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YAFIXFbck6dkZ65pLgdguSyhqbALAVWmjIw6Aioq+QtUUkV7ayCN6zpZr3MBejwssn/kkLi+8udB9Ak3A1+uKcSRafHbdqpB/E+aQKkswunDXdASNN5B/X9uG1EECZ2CnLoZi48MLdNDrHlh100LJA40ToUruBK7qA8/rtZSTa4mki/t7eoUP/jQMCe8+QtDaHiouyPSB6dkcBftoSjp7rlqBbVUKfGEwC9UPaABfbkXsaSXK2pYh0m/yzWFC8hDVn7VvVN8F7chH5dOdhnKe/Po05LAH/UQyMk9HZSO/EAIcYIS+Vf4AjuVNWmYkRSZmCAig5NhmcATuK119dfdgC9wDBKGDE6BMpzIwIbCYqI/ma+i55BxhX00JjSnc4I3oINzUgzMx5RFCbxdc2dyntzPUxuzNAQwpzx0KJj+RNyfBwx5goLS/G4gOOPvA6xnkjy3KvURp83RyN5ZdrhFYjWf9Lsrk8v8PX+obAl4Bf67ohpYAX1+YtoK/QtcWOEGo9TA6FDzEMGyYQLIBTNRxIWHiNfUIHMZvacyJLWUYkVemVSsIUblwo6S+j5+XL2dT9beXEMMrshzB8Ab8lEWhYlV7LufKER2j+iStAlivP+xaWvxx0SJbJEGEjoks/muyiVtUWcr7DcBQqYqUtd3XRxOzTJ7mfkNQ7Ig1Sk8eyoGw6OowGJPVr2J50QbYtjzihAG4zVOuwiQGznJ4DkIdA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2351.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(346002)(136003)(42606007)(376002)(396003)(366004)(39830400003)(6666004)(316002)(66946007)(186003)(8676002)(4326008)(2616005)(2906002)(6512007)(44832011)(83380400001)(26005)(6506007)(508600001)(1076003)(86362001)(54906003)(5660300002)(8936002)(38100700002)(38350700002)(52116002)(66556008)(66476007)(6486002)(7416002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: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SLqKuwhUnKfJgkR/ScYojfC6xIAa7o5sTDolmCENo+krhhuu+hAikrf2il4nlD2zXC/XNqi9ycbjdglPotrG/KiZvE17SGuSjpIRfzZ8Q1AM5CGl6K5O6bHYYX0bcbbgclag9IodqJghz8MzT2mpoYdVn+DiMC2u20nG3XQCk6lcnOOnpmZNQ26T/UOE8hFCJsybHUeJNh2vjYTHR2H5n6vJbEC8fFcQ/LU1stsXveYon2E3uh/z3yVp+DwIXnumwbjgbCD7zlG8l6i23cVACPjNZtLsbpIP8q6IQoxLRNaym+5muEP5TJL/9+oSx95FZmVB0L6z03NRpUhpvvtG9yyS1ucwQKlzT82bz30O0rdp3zha4VfT9/O3A0eNXAU3tGjD8CVwDw/hx7DQfiAVgm2M1eXAfErsT5tCqOnUJSsDIa/ucvRqcwaGd9f6uoOyCeEAEjWGH06yi2awM+09eOm7UyeQBw2s+vzSqn7ILF+HTO3Xp7FtWqEu1AbWrqYsXmNXTEq/fEStZjshFnsGyoiKzLjZxz5ghNgF/z5ljxnlRJm5/aJopLBUmHvUvyDaSa6KcjZXmxaRmth8PoxbKV9ZUKcxv1seiYxBsbYkKB+cjzs2TMGUjGD1fpE6O6Cnpt/hVUEiQOWVw== X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99fcc300-b96b-4ea1-0cc9-08d9ca7a7d99 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2021 03:22:49.2888 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /FZxmWt4rGolOibAweo2MKd9xYRIG+pTbWEwfq0jprqmtP7iR6BwlgVz2nIu1P9VR0JlPTkJ085/4qV9BSv1XxgJmZ6vC/8QLNGq0ISzzd0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB5521 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Simple rename of a variable to make things more logical. Signed-off-by: Colin Foster --- drivers/net/dsa/ocelot/felix_vsc9959.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c index 93ad1d65e212..bf8d38239e7e 100644 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -1089,7 +1089,7 @@ static int vsc9959_mdio_bus_alloc(struct ocelot *ocelot) for (port = 0; port < felix->info->num_ports; port++) { struct ocelot_port *ocelot_port = ocelot->ports[port]; struct phylink_pcs *phylink_pcs; - struct mdio_device *pcs; + struct mdio_device *mdio_device; if (dsa_is_unused_port(felix->ds, port)) continue; @@ -1097,13 +1097,13 @@ static int vsc9959_mdio_bus_alloc(struct ocelot *ocelot) if (ocelot_port->phy_mode == PHY_INTERFACE_MODE_INTERNAL) continue; - pcs = mdio_device_create(felix->imdio, port); - if (IS_ERR(pcs)) + mdio_device = mdio_device_create(felix->imdio, port); + if (IS_ERR(mdio_device)) continue; - phylink_pcs = lynx_pcs_create(pcs); + phylink_pcs = lynx_pcs_create(mdio_device); if (!phylink_pcs) { - mdio_device_free(pcs); + mdio_device_free(mdio_device); continue; } From patchwork Wed Dec 29 03:22:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12700730 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB1F3C433FE for ; Wed, 29 Dec 2021 03:23:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238568AbhL2DXG (ORCPT ); Tue, 28 Dec 2021 22:23:06 -0500 Received: from mail-bn8nam08on2138.outbound.protection.outlook.com ([40.107.100.138]:18785 "EHLO NAM04-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238553AbhL2DXA (ORCPT ); Tue, 28 Dec 2021 22:23:00 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ad/bGmjo+IbVbwPRG/+VqO+iO+YX0U2YksZ1C+pITDigK/KtmawbyZziie+9eWPqhICkaOmfMgmiotRa1hOwzeJZruGCiSMFolU9k7OpDwwkKgzRfjtUrLzDQ/lybBoat9eZsVFaXmyla+88KgsOzk4QMHWxQjhtov8Su/OnlgG75EjVRamLCsXzuemcCHqn5r/R8M5yMZtYuqpm00BEA80K0KUs9yZhA5Vpql/5wzZWOzxs7KrQ3ex9YyMHbS685XOlhzmxsjwYVgqdveDTmPqJDrt2x5oEsTMEzX99/imjcvXedOXMmlUWlu2Egb+8bqZCbGTdL6Dw8U5A6LPiOA== 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=vaydjUIgrKi0bNJce1tml4C26FG0kOgN/Ew4lJlmzY4=; b=PkG/d5Pd1F4b/SxiVRA815e4z4+pSZzbRzVwCydHXHUBI2yS/4PkkPq0Jbl46HWKlDZnH3aSywx1hQCSiqoDqLmQvJeSLzpBCleqUzHkMvZ9FCk6/fijJ+zici1Z1EuoNP5xEi+wiyW4kN2ZkemAxhN04Oh7aCQOkGfqEgFkA/G1ToZxcfSRiqdA/RsPtBFR1EJ/8WPcf94Ec+c07nAdMlzpmkOkODP7wW9Zi5CJ+p0TyqAmkFiWnxCuj3aB2oFMPIEJf9Muxhdmjn77AAPBuEivA4mjOnR5+VnFJ31uJbJTGcxqwkc79Hss2hZTavwJLJ+4lt2cJT84GpRV1r2fSQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=in-advantage.com; dmarc=pass action=none header.from=in-advantage.com; dkim=pass header.d=in-advantage.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vaydjUIgrKi0bNJce1tml4C26FG0kOgN/Ew4lJlmzY4=; b=dzVZaKA/4nF3JFx9B6Igzx2GnNeWnuhVwGMuy61J22nAGqh0vIG5DAROQUwrmGk3+KgVyTVzxbKDoMB76eKPPUaCMKOpm6WKrcYFdBr65rZe4F9Uasgaq3aw1o0Ks5JCemi/4W0idfXBfTqHmih2ZIKbrlViu0/o8Cuo0hRmiTA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) by CO1PR10MB5521.namprd10.prod.outlook.com (2603:10b6:303:160::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.18; Wed, 29 Dec 2021 03:22:49 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::2d52:2a96:7e6c:460f]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::2d52:2a96:7e6c:460f%4]) with mapi id 15.20.4823.024; Wed, 29 Dec 2021 03:22:49 +0000 From: Colin Foster To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Russell King , Heiner Kallweit , Ioana Ciornei , Jakub Kicinski , "David S. Miller" , Florian Fainelli , Vivien Didelot , Andrew Lunn , UNGLinuxDriver@microchip.com, Alexandre Belloni , Claudiu Manoil , Vladimir Oltean Subject: [PATCH v1 net-next 3/5] net: dsa: seville: name change for clarity from pcs to mdio_device Date: Tue, 28 Dec 2021 19:22:35 -0800 Message-Id: <20211229032237.912649-4-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211229032237.912649-1-colin.foster@in-advantage.com> References: <20211229032237.912649-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MWHPR14CA0015.namprd14.prod.outlook.com (2603:10b6:300:ae::25) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7c9a6ba9-d8d6-42f6-1b37-08d9ca7a7dea X-MS-TrafficTypeDiagnostic: CO1PR10MB5521:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2657; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /Ghk9Mi87B8J1zabxPsSIvHNjL5tujFttzRXHDbQeXbE79k7gPGyJq0ZODoSsguOxqpr4QlSEV+t0uvjyOXHyKnDNWsESv42hKIJ19JtlarGd2GGimxkA3/RbdR+d6BFJ6zgf0FOO76rgUm3pBLapZoRVPBal8Q6EOA5BjfGrtv7RYt4Gs9YGWMwlDS3TzoxjHuhZdnFZBpN7HaTL0c9u0hFpnMJP/6w7cwyC5QjImokwkXKKv54RPjLLL32HuvufX94P4NG8QqQUbe/hi3Pc8ZbXUtw4s5M+x5yuRgmC6M5aQA2+vfPrdc+pQfah5cnkJHKaHPPM2pzooYu2yAoUurYKttvta15GZCybG3jiVU7WZiIERZTJRM2TPmHPClLw21bgt5zX/fJ+8NxLWzaufdgxsI161OYF4cifAXXTriNWA3tE/HBR+nolYQ7WuM4gUTUzDOIBsMM6zLnGNwhNwitQpMztC6XySA7vN3uR3cPMnD1HPxYxIia5X0MPj8ZQFb55+8l9B27b6MqMpkJm6b1MzYVqzzlYRigjhSsDHZDH3pCu/5LUt2Z7XG/iuypM1mZmjy6n8+CbQoff10JIL3EII5YgGIwc72w6iwDqahW7Kqn0eO1XlymeCpI+bmIyp5FjfNjpjtidxVhqo+ShU6ocDKnHe6yKBn42U4gWkcz9Y+TwynvVQvozdYl6AGjHnWR7hqqoougkzO/veJIVA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2351.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(346002)(136003)(42606007)(376002)(396003)(366004)(39830400003)(6666004)(316002)(66946007)(186003)(8676002)(4326008)(2616005)(2906002)(6512007)(44832011)(83380400001)(26005)(6506007)(508600001)(1076003)(86362001)(54906003)(5660300002)(8936002)(38100700002)(38350700002)(52116002)(66556008)(66476007)(6486002)(7416002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cAOTTGDjB2Ap+7TrGL7ozyisAMF/5DFO6fsxCIvNP5gcMi3ycBL89s3MS9XbFagpZPqECN4FJEuqBdR8KL2eO9NzIpA8WNLsafKjR9k+SmiSADdkDTIaHgQGgaryCoGxgvdtaFKJ10rRKpJoyCjzA8S9wuQuTVf2h6b6/m+coFB9I4It1OKQFRR+HbL4ngpnIIfxeH5Yn/+QzQT+fpIQwzY8AQ18QTk99n06FkIwCOvOeInbSt98OEEI2J3PhnXLsQHwRKAv0xHlHWmVY/xRfVXxcMPYrgOAwG3A3k4l7ROcsovgShZHJbtTsbu2Sku7NShvcLBR4xJ6CyfdF2kKDsWve7G0moRzZhIJs2WkVpyb9cB4wmWKKLaSER4m7o+D5QxjiN5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G0QBfmUD4qLcFh2if/o5wdfa+tjnvs2cA1n4IB72X1xQj4xr+4jH5NZS5joM7lf2Avin1sILpSlllSczXOOmMOHc7YuDEWE1WafmMnkC0LGSi0GRXUUJeMb5GZYKwN8I4TborWBRxYYEBQplVEbEXToJ+95/ym+Y0r2HcGMmqTYgHZZZQXyRiaiZjzMt4YhzYGQh8X5NRZu1ZDbjFdcb82mXIgK8vQ== X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7c9a6ba9-d8d6-42f6-1b37-08d9ca7a7dea X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2021 03:22:49.8357 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FCogmBJxFhIPNE/aDUQg1/7DfJnL+jdK0uhw2L1RZv/v6AC18ohiPlQLfwQLOuXc64eVL9oUn4PfNi+xG9aLd7MZJ/mI8sAWYwtt8r47bMw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB5521 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org A simple variable update from "pcs" to "mdio_device" for the mdio device will make things a little cleaner. Signed-off-by: Colin Foster --- drivers/net/dsa/ocelot/seville_vsc9953.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/dsa/ocelot/seville_vsc9953.c b/drivers/net/dsa/ocelot/seville_vsc9953.c index d34d0f737c16..8c1c9da61602 100644 --- a/drivers/net/dsa/ocelot/seville_vsc9953.c +++ b/drivers/net/dsa/ocelot/seville_vsc9953.c @@ -1040,7 +1040,7 @@ static int vsc9953_mdio_bus_alloc(struct ocelot *ocelot) for (port = 0; port < felix->info->num_ports; port++) { struct ocelot_port *ocelot_port = ocelot->ports[port]; struct phylink_pcs *phylink_pcs; - struct mdio_device *pcs; + struct mdio_device *mdio_device; int addr = port + 4; if (dsa_is_unused_port(felix->ds, port)) @@ -1049,13 +1049,13 @@ static int vsc9953_mdio_bus_alloc(struct ocelot *ocelot) if (ocelot_port->phy_mode == PHY_INTERFACE_MODE_INTERNAL) continue; - pcs = mdio_device_create(felix->imdio, addr); - if (IS_ERR(pcs)) + mdio_device = mdio_device_create(felix->imdio, addr); + if (IS_ERR(mdio_device)) continue; - phylink_pcs = lynx_pcs_create(pcs); + phylink_pcs = lynx_pcs_create(mdio_device); if (!phylink_pcs) { - mdio_device_free(pcs); + mdio_device_free(mdio_device); continue; } From patchwork Wed Dec 29 03:22:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12700729 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4697C433F5 for ; Wed, 29 Dec 2021 03:23:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238567AbhL2DXB (ORCPT ); Tue, 28 Dec 2021 22:23:01 -0500 Received: from mail-bn8nam08on2138.outbound.protection.outlook.com ([40.107.100.138]:18785 "EHLO NAM04-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238535AbhL2DWz (ORCPT ); Tue, 28 Dec 2021 22:22:55 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oILe5HryjwqTxAZkMvzaNXxLh3bURsEwL+3mm7/VsxpgchJzv56IrZp8t0dV0q8psJZYuo10Png0H7pZqfdJEhb2XNpvF46w/AQFulSLKPPFjol5MMOXyvZ3FqRPfkudj1SGlzu9+v53EhmZPHdqvvV65ACy5xr7kDoaWX6hvFFuNLVNdV0gIhiTgrq2+OdTgFgoz0wnAfFNu2iKMGaUzDq43dBGBL/4ebK3iZzfeEjljE9GbUWmgrHD9ihuqBDSxm2S+hq6MVwhbHABYOtIN3c8w37mbDjavN0LB5NL41U0eP24GZeCIHdVxqXD1WcXsyKPuc8HWdEn//ACa4BvEA== 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=vKYOy+jUiVJoV7CTmh++6Blxmov/ResMfYxBFE21h/0=; b=mt0yAAq/iBRYbVfx3l5jo5Dvs07Kkv/juG0VCkRkb8DU3E4+OyU34vbaZ1kHPJ/S9pd128mJV97DhJPwjYoTjlFNWtexthhjS8VI5VLRW+hqWnIMeKHGsZVtc5+NrONwbck1ZDQGOthcXbNO8Ylp5A2kjOsLbl/ldHCOskJ1XL0tiOSh/oGbO6rcZUmeZyph8rjcfqhq0ZeihFY68W7dZXoDl22RTSLJMmd0yMLnhLY7lL8jVl70PKzsjh26mXtaZpZjOKCkKTjjiNkwdjWDP1PoVaIKskFp2tX+XpncGHDprXGcqHWCYh1RYxpPkMsyXYgmIP/1bh2APHzKqcRZTw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=in-advantage.com; dmarc=pass action=none header.from=in-advantage.com; dkim=pass header.d=in-advantage.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vKYOy+jUiVJoV7CTmh++6Blxmov/ResMfYxBFE21h/0=; b=FGkkkGb2sbyv+w9Be/6xqVG/LH5dwRfV3QuCHAUA+oRAHYXTH3vhmhpU5DYyPsYbzT+5Xhe2izLKRtJndC6ejpbf1jbxdOeYbqTSrd4wqSLmAvMI/DQ5EyZ719cfx2gQjtyiZpTMyj4CxUOUkfqRQM5UbGnjvKZ3ezb3IJinnBE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) by CO1PR10MB5521.namprd10.prod.outlook.com (2603:10b6:303:160::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.18; Wed, 29 Dec 2021 03:22:50 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::2d52:2a96:7e6c:460f]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::2d52:2a96:7e6c:460f%4]) with mapi id 15.20.4823.024; Wed, 29 Dec 2021 03:22:50 +0000 From: Colin Foster To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Russell King , Heiner Kallweit , Ioana Ciornei , Jakub Kicinski , "David S. Miller" , Florian Fainelli , Vivien Didelot , Andrew Lunn , UNGLinuxDriver@microchip.com, Alexandre Belloni , Claudiu Manoil , Vladimir Oltean Subject: [PATCH v1 net-next 4/5] net: ethernet: enetc: name change for clarity from pcs to mdio_device Date: Tue, 28 Dec 2021 19:22:36 -0800 Message-Id: <20211229032237.912649-5-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211229032237.912649-1-colin.foster@in-advantage.com> References: <20211229032237.912649-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MWHPR14CA0015.namprd14.prod.outlook.com (2603:10b6:300:ae::25) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 039bd8ad-1ee5-47de-50ba-08d9ca7a7e42 X-MS-TrafficTypeDiagnostic: CO1PR10MB5521:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2657; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: p9E4gyxBE3K3wrgRGZyMhd5KpszNypV9Ecuwoeh7vuiqF6DMLzp29b0WFLdwKkkQOW7Ymt04Iumkx/QsnmFHbdGipWrpOt00F5Ly4MtCqqKeEYDg9ZtHH2/uPrGxAXRG/rzPD9pIBkBMOJrrOTlr0E9AItHtev4rVLmoqUgobgweSW5rlFsUsdLr+9zQxQOFYobvEq0HhNEgELTeB6oRLsOJB+fVVoH4TRtkFSIAgMKZkA8AtIWt2sLcQh2JyJG+DxfiP5EePqzXoIO2HUS245H2/WX7u6+w4LFIH5Gc9pIKwbBbfADzGINfTWw53TInRx6Wk9TvnVXq5d5kq4T69+kbz8/MQ7IGXN2zllcbg7GAPU4X+q6us09GU1H6XRbb+yLXUUA0gZ2gZESucuhiV8DZ4k89mI/q6gzmLqerY2C/yacAA/OlClhYqio6fQepUinTJjHdb9/1BN5Vy8STZrocD4XxlxARxs5bXuHgj8NJGeEqZMBTQp2k87aa7vR68YMkB8ifW9UeAtATy837Ru97tHlKtgZF91lZXlj7sZSwVM/FoPgbEmdMKV5wJpnKMy3e35n+LlYcjqxdEBEWM/QzCy1mgtK0D6xoqAJn+KfnAbEn/tuHZdhEauOSyY9CXnsEBiD+LPF/YMhs8P0VPp9vNcHX7ykxehG99RwTnZR5lIBiLejkwkpxzTnKyCdrxgUHUEXu2M8MkgPgXWEsdg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2351.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(346002)(136003)(42606007)(376002)(396003)(366004)(39830400003)(6666004)(316002)(66946007)(186003)(8676002)(4326008)(2616005)(2906002)(6512007)(44832011)(83380400001)(26005)(6506007)(508600001)(1076003)(86362001)(54906003)(5660300002)(8936002)(38100700002)(38350700002)(52116002)(66556008)(66476007)(6486002)(7416002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yx9XcMOH8rPRoxx0xfmI01CGewzBQxa3SBQ2hHZrLvPj2FJSYZw3VSZB6x0c84S3msk7/ctLH9HfrUJOTpRBVNIUv/923F/Xi6jyTt5sHKSSWN/+e3Fzxv5xlUwVxhqf+GuxZlvr7F0LdKa3UqU24+m1FuslZB8atCV5lcubz0G3x27Sb4DJGw2jtzm+Ns5xmHqIGopmVTySwdYR+z7EX7MSueOphFTjbR5YIgg3gmX5zOX9JsDFkT45ce/nMFQYZc/sVAx9cCj31hp2UcXzsLl5dsj3S7UI81ygrDuU6EZu9cE3PhSUIBIP5E019p91mHuEr5Pnq7AD3sgeBBHTua8UDEnQUA/AC8/wry7W/bNaPnh0y+saxH7+5rybeSMdpesOMnxQld6yA7xjr9w09TuSpcujBBvxO+7GSIkN21gAyYCyn0hT1sWKpJtiDtQqQcxZiTlZeMu25A0g3ZYFODgsw9bwWnczZRPNFOx8S4Hxhc0DyNHwYBQcVt5eSjRGA3GXACrMQdU0Tw4Y53Zmvv6+A+DWit9cQpWl2F8RQmdEgnu5Bn31fJzsu5NY+I1zIuCN3SwhwUlkZfRgoqMDeOIK+IyC3ER4bGM97DhASEGQGKjcEONDWJ2g3h6iN87zt3K3t9S+WUmF3COiBLPKfWQsdwQwjSF4lqeDb2dKb2jQZvzTxjy5kAvUfoMuVwInP9y9MiklX/iVqa5TXx1I9p/KbSl/JORSmMZCNSIuFXKSS8pkNCKfweenCrb3mdIt91k7wrFoCkU3dFcXXvOGOS8Hj3P4Veggc0kt5jWv+0esQ5gtLmD4dnbtVnMw1mgc6YAwTzpeDe/Pf0/CsVauPaxpdRSEMw1cYao/swuA2+UaZB7037WDbVdDTDRYaYE8J8HblPN3KpPnNKKyIIceqNlamgLUJNlO4pQCgHT20dbmJWLlgdLMnaIqA6gqfwU6e1SIvJb3Yh7eDjXymOUfeVdc+UbqMS3K/W9v0IOtggTa+EFw/df+08WTFQWO4ThRGB6qwl2Myb8kuuU2mzmm1/+WmvOIA0y834i3dKUv9mtlvVO2eBR0YzrmzBdGbBHYg18tzsKT49ewu97Bx/o67QLoydGecDtAiD6pxE3sbaA00YTEaZGsf1hOnmOWi+64fQjF7ErzS0zYmAUO+bx+JUcyw3zaWpioOpdrBoVU7hMl2dwC12H6DsRdoyl5vIkanxFegdPURwQ+S9JH6w/4lLr7Y8AkYfV7GQVCuX+8cgTHTyGNASrSMtUt2Fl9gjKFEzEXWQuAFLW62Qxc+nWiaSCLHtpZyW0ru2LHdAo04nC7UD264RGmllmW5lzDIEo+HLWcROwg0tcNKHUfM9I347Yc2Hz4ZY2v0F/j8/3G3QpRXWn53vzHHmW315H55089A3/3e8RFw65wMnv7QL0Es6fK+goAnviyeivL3AEMP3mDOs3nfOxmC9jFzAhclkDgYZ+bmkHptw9luOlqm+FPY6NxPE8pf54Slxg0vp8sIJwiZy/HVfkp/BMrv/0Zr5RgKzXVd6PIxghy2qrPkN9z+SoL2ET+9vhfxk2AID5v0xRZUHz/jjnMWQNWnIhfnlC/aoaKIbRnoRS3iuJD4P4VBjGDsrBCgSHEAp89ySuLzHTmrE/0L1lqWDnQsZqiw8zz1phcgO6Gujp3UvZEta5QHg== X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 039bd8ad-1ee5-47de-50ba-08d9ca7a7e42 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2021 03:22:50.4138 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XQuAGf29MgKOLVTouldiHZ4JVng2S8vGvoKwHvOU2YkLCViFqsxO/IudiFpJEKNmCdC/S5ycDZu7oU9iCWVHXmTbjnELpE/TEh3MRwZWZpA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB5521 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org A simple variable update from "pcs" to "mdio_device" for the mdio device will make things a little cleaner. Signed-off-by: Colin Foster --- drivers/net/ethernet/freescale/enetc/enetc_pf.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf.c b/drivers/net/ethernet/freescale/enetc/enetc_pf.c index 38b285871249..0b6d366a04e7 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c @@ -829,7 +829,7 @@ static int enetc_imdio_create(struct enetc_pf *pf) struct device *dev = &pf->si->pdev->dev; struct enetc_mdio_priv *mdio_priv; struct phylink_pcs *phylink_pcs; - struct mdio_device *pcs; + struct mdio_device *mdio_device; struct mii_bus *bus; int err; @@ -853,16 +853,16 @@ static int enetc_imdio_create(struct enetc_pf *pf) goto free_mdio_bus; } - pcs = mdio_device_create(bus, 0); - if (IS_ERR(pcs)) { - err = PTR_ERR(pcs); - dev_err(dev, "cannot create pcs (%d)\n", err); + mdio_device = mdio_device_create(bus, 0); + if (IS_ERR(mdio_device)) { + err = PTR_ERR(mdio_device); + dev_err(dev, "cannot create mdio device (%d)\n", err); goto unregister_mdiobus; } - phylink_pcs = lynx_pcs_create(pcs); + phylink_pcs = lynx_pcs_create(mdio_device); if (!phylink_pcs) { - mdio_device_free(pcs); + mdio_device_free(mdio_device); err = -ENOMEM; dev_err(dev, "cannot create lynx pcs (%d)\n", err); goto unregister_mdiobus; From patchwork Wed Dec 29 03:22:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12700731 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79549C433F5 for ; Wed, 29 Dec 2021 03:23:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238577AbhL2DXL (ORCPT ); Tue, 28 Dec 2021 22:23:11 -0500 Received: from mail-bn8nam08on2138.outbound.protection.outlook.com ([40.107.100.138]:18785 "EHLO NAM04-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238574AbhL2DXC (ORCPT ); Tue, 28 Dec 2021 22:23:02 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e5oEiI8sFfstb5oAIPUxDnpYyC1xEuEGxHMngqRyJjBWK69aPINLv+cp2bWASe0+wIpGxoIq0/2E7Q501+0kXf69lB17sGHUMhUmKNPYNboEPry/TAWHlKylmUYIoKji2OSi4b14FrYpxMe8vYGgoMven7hzc10hHbTQi9ZuIea3Rrjf6QL3fpMaHbFOeWXO2hmMket0kK09xa/coKPDgE8vr2RzNYIpxjyljb2FHL0XD4hUaNnlYtnvyJHQfXlgozxlM25bkxw3lmKNqflyaCJ+TDlq5Bl9JQNQTMwxdgwlDbhPdqNz7YmhyrxNm06InPJIYkH90Ko2nMq2qR/UzQ== 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=toz/kREwsP45vdGNTdO8e4m3bTuuZYfc/3+TCfHILJk=; b=N4gMu/KDtygc3m0uLLW178z5yiexwlQ74jcHeH3wmwuiK9CCn597d4rxoOXpfswkaQhqOVq394+YUmhKkDzUGUjfihVNiXOn0Yg7l8RRbxJNvZ3R7wF7aGxs8pfCZBjy4POnvPOUjwJoeOp5BpuRXNhWR6+YhdwxAwwob7CVQkp6b4mOsi05PA0QtWaG8vAUp/TSf7lJIlY1ZrwoBoY5RTjjKDmfsdgueXu+ZJ7WWKhUmwjq2MINNbyBmK0ZrrwoM1wszQrLUCcN6Kq/9uHdAttcbv3Tyd+N70LJQK1IBFmE3pGyD6/QA+qv0fHPLC7NVKFgZ8heMOktEtKUqqCaVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=in-advantage.com; dmarc=pass action=none header.from=in-advantage.com; dkim=pass header.d=in-advantage.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=toz/kREwsP45vdGNTdO8e4m3bTuuZYfc/3+TCfHILJk=; b=ynTr8FMkduqR/DMiIkYb4RGsy+CAN8qmEs/7h9+RYnlwiHc5p4T/zZmmpyV9+EA2UnkLHc7puyiD0ItQW62fwk+TobW5qGn+Wwwcs9pUDaaGiywR1rFd4SYdttzM61MxBKzMrf552JRToIsTD51B1xrg7wq2OMg8OaJS7mwvcVo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) by CO1PR10MB5521.namprd10.prod.outlook.com (2603:10b6:303:160::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.18; Wed, 29 Dec 2021 03:22:51 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::2d52:2a96:7e6c:460f]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::2d52:2a96:7e6c:460f%4]) with mapi id 15.20.4823.024; Wed, 29 Dec 2021 03:22:51 +0000 From: Colin Foster To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Russell King , Heiner Kallweit , Ioana Ciornei , Jakub Kicinski , "David S. Miller" , Florian Fainelli , Vivien Didelot , Andrew Lunn , UNGLinuxDriver@microchip.com, Alexandre Belloni , Claudiu Manoil , Vladimir Oltean Subject: [PATCH v1 net-next 5/5] net: pcs: lynx: use a common naming scheme for all lynx_pcs variables Date: Tue, 28 Dec 2021 19:22:37 -0800 Message-Id: <20211229032237.912649-6-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211229032237.912649-1-colin.foster@in-advantage.com> References: <20211229032237.912649-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MWHPR14CA0015.namprd14.prod.outlook.com (2603:10b6:300:ae::25) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bb616982-b09a-4fa8-23bd-08d9ca7a7e98 X-MS-TrafficTypeDiagnostic: CO1PR10MB5521:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sqYNuTw/6u9Vs3pEh8CVLnUlNAQWNOeUQJFo36nDYltPo+BfW0kEbC1Uyo9JE1P3kRmsCDwtAGA+u+U1G3/QgS+eYr2t4DvBLTK0ozG0VQkMv9Yy+NOZxZ6U9oZHDo+KP+KRRnjlg/pSGJNxO2agUFCpfjCo8dKRfkz1oMgmENv6t1nPkheIoxsJUh86DtFiEWw91NRLpWU+lSJFLFBMmXpsg2+KyFjvSt4YE+3GAtXM0S00fp1DzJHyHMtWlnpyasFSuiY2tDk/JVG1h6CYOemHuFkqd+yBA9Pn580pIhwOLe/JIPkKAdoOqYn1eC/qZDV3I1vB4RPY08PQJoN3n0Kt3dQpXJkZF5mUs+GPw3URUjXypTeTaxyqFXzGmEzaxhUyGUB11YEiDODJ7UMiJn1eL/S3wRv5z4N1mc0rgTwAVoDX0k16t/mQHCF9oWQpojnd62HtsF/X3YNkDI9Oqfc9yq3Fg95dGzK1Bx9IAsVk4YzAqRPerNBlOV6oX44tcj2sjFV6wf/3XRI18e8RUQBa2qW+CXDsZ5Pb2P/AheHVyQaXrcSG3VA98ouWOR/b93NviSz/kq/VWFXX1It+m1fiJnjP7DVV7ZeWGgLZfZlQ5Un36Y1j7H9pp3vaSu0foESXtziT1m9uAouiyDrB4RbyQSil2+4ZqYRmupKdh1xDoETR2XUQ2O+T4iWHfPNNgkLvg3/3MO8jXAY3p+UM/w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2351.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(346002)(136003)(42606007)(376002)(396003)(366004)(39830400003)(6666004)(316002)(66946007)(186003)(8676002)(4326008)(2616005)(2906002)(6512007)(44832011)(83380400001)(26005)(6506007)(508600001)(1076003)(86362001)(54906003)(5660300002)(8936002)(38100700002)(38350700002)(52116002)(66556008)(66476007)(6486002)(7416002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: q60BTOl65WzMwo0vNQjSlSHP5pBz7BlfUwUZZGxm9R4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2s0xSuo0Y8bIBV2/HCd1f1XMJCEvLVsQZV31nPVAjGcoJQRMkdgcQQ9x3mqi+fbT6O/1Ul+3FO/Q9hEdaapN/0ka9Kxg3BbZ6U8IvnQODbMVnhiHmOJk1Nw061PHp3tPgQjxEZcm+Q2hWgZn4emLMBUwSSG2/k+1nXyqlF8LQLT1EMs7ozHrWOcPLB5Z9KYXt4cz04KLNu3Mj4lw4tbhBtpJydJ4oSFiBhBTDTVDf2Dv16ZdvVhC0Kqm2h/2dmoUsc4zt1dyd97XUwwp3bHvK7eTyKABIjZkWxNYON+LqvD2nvWsdMTNraE3+kXT0gz3E01+wKvqbVs0Tyv9maFJKpldymyw9fSnG0cESW4awZiVP4VkMDLuWJPCGBeE0a+sonzEcnCVXUqBybF8uXyUaWQpwTIRSyoKeJpytReRtCfb+rkE7DzK9ntgdM0FM1rnyL9ruoHW0lwY/+qk8S+bU++bwC+2ej3NK86oU2QTm25ip0/QqgdQKucibQCvB5QKbRjSe3C0fJ/9gX8v1hxegd5JSITje8yU1TE+5UPSHR29g== X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: bb616982-b09a-4fa8-23bd-08d9ca7a7e98 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2021 03:22:50.9606 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rlAJhb0R4ZvkcYyorruIWOKD+i9PNrSUfT+9Rr/ORctd9qZnA5/ie0s92k00IwvD6LStSxqefdt9vyfP83P/ZzEUpaGGAhPCRgURrU6P5+U= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB5521 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org pcs-lynx.c used lynx_pcs and lynx as a variable name within the same file. This standardizes all internal variables to just "lynx" Signed-off-by: Colin Foster --- drivers/net/pcs/pcs-lynx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/pcs/pcs-lynx.c b/drivers/net/pcs/pcs-lynx.c index 7ff7f86ad430..fd3445374955 100644 --- a/drivers/net/pcs/pcs-lynx.c +++ b/drivers/net/pcs/pcs-lynx.c @@ -345,17 +345,17 @@ static const struct phylink_pcs_ops lynx_pcs_phylink_ops = { struct phylink_pcs *lynx_pcs_create(struct mdio_device *mdio) { - struct lynx_pcs *lynx_pcs; + struct lynx_pcs *lynx; - lynx_pcs = kzalloc(sizeof(*lynx_pcs), GFP_KERNEL); - if (!lynx_pcs) + lynx = kzalloc(sizeof(*lynx), GFP_KERNEL); + if (!lynx) return NULL; - lynx_pcs->mdio = mdio; - lynx_pcs->pcs.ops = &lynx_pcs_phylink_ops; - lynx_pcs->pcs.poll = true; + lynx->mdio = mdio; + lynx->pcs.ops = &lynx_pcs_phylink_ops; + lynx->pcs.poll = true; - return lynx_to_phylink_pcs(lynx_pcs); + return lynx_to_phylink_pcs(lynx); } EXPORT_SYMBOL(lynx_pcs_create);