From patchwork Wed Dec 29 05:03:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12700739 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 3E225C433EF for ; Wed, 29 Dec 2021 05:03:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232289AbhL2FDq (ORCPT ); Wed, 29 Dec 2021 00:03:46 -0500 Received: from mail-dm6nam08on2097.outbound.protection.outlook.com ([40.107.102.97]:64800 "EHLO NAM04-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229614AbhL2FDn (ORCPT ); Wed, 29 Dec 2021 00:03:43 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aIT5jtQGo0XwZBvhKlO1gCUl6V69aJJU5nAVf/9B3PnL8lrXPXQ1mPgG8p/BnqzpTt029cmDhJYxoCiNl12R5OLDSDeo7WEKDqyN5mNlxC+WGY3xLdqM/HMC2b53HL8qdkFD08HJgd7Bf4NeudFyWa+z899vaGHJtwfB+dIwoF3L6J1NkwGrpziQu3aIhAtpqNyfn9pm1rGGaeJT9u/udqV2SfP6wp+UEj4GtPsx+phZEvmZRlKnRvp2ImSrhdJVXoHqj/OLxepb50p0YshAdkr8R/FncRt3nQWqTJPB5koLYdEy/7W4FaHw55E3p332VWe9ude4xMU6wpuIOhbhkg== 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=X3I8bFq1RrC7DmRxtzSgqcEXpeZKTKWzDORpVAI5/KE=; b=hM9cbcsOYV0tccAVBmF1NnSAnXD0quVAqj1ReToz6frEyOIzsDvrsvnBZ11JRpk/1zG44UauNUiCz4aSOKFzrUL8BK6JPja8r8njvpcUk2B5pnRJXMcd+qtSE8UwFeYjoMhF3hA6i/ycDXl5G6d5hoX53yyftq8BmdG6lkBDUqqWNQwppVldy05dHmf7ZntUHweXRlveJuHtB/JvxWDiveVYDx/0K8fe4LF8TwzonS8izH4jsf2bAV9+mCp9xPZm+p5ybxGn1W1RFEBnDg/K/+FJGtgUKYPKDrIcUICfFih/v5sCmUnLLODSnQ0coQ5frGCb7fq2UG5NHugYIBgATQ== 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=X3I8bFq1RrC7DmRxtzSgqcEXpeZKTKWzDORpVAI5/KE=; b=cuNFhW/ljPMRJWMmhX/mrIKBOs1lCE0kQyEY+580Q1uigdpXOVdQ956/Elu4EUb1bp1DDMy1Nyh9CDsRfwwGKWXX4CpLZoZpYQRNwqY8b+kgPgBbCfLmjIw/J14i4I0uPW6p9NIqu8R03oDSb6xkK4kGrwEwv56ueKfh/NjQy+s= 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 CO6PR10MB5441.namprd10.prod.outlook.com (2603:10b6:5:35a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.19; Wed, 29 Dec 2021 05:03:39 +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 05:03:39 +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 v2 net-next 1/5] net: phy: lynx: refactor Lynx PCS module to use generic phylink_pcs Date: Tue, 28 Dec 2021 21:03:06 -0800 Message-Id: <20211229050310.1153868-2-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211229050310.1153868-1-colin.foster@in-advantage.com> References: <20211229050310.1153868-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MW4P221CA0026.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::31) 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: a1f6fdce-98e3-480e-70cf-08d9ca889380 X-MS-TrafficTypeDiagnostic: CO6PR10MB5441: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: 7bXXmKGkCLkq0saRuK1TBW/1NPnLKDK5teJa+tg3ZbV4mSlYcpbuRoLgafbJNZid6roE42kNBXDam1ceBy8hn3w0J3Nu/05uCafKmiU7hUc7G0QiqkfUvo//adND/ZqEDOu7HDLuvZ9ZM9pbMxN4NkdccJ/LgPX73vr/y6aSA6WQ15pJGnaYAoz4iEz8l3HL8HUPYoVCitZuy8nkw3k9fyWCouia1c8LcSq/GTW3NY2WGx599vFHFtOBRGuvLrzt8tUHAfCfu2yPZDvnhPLz58f43mkYmOyx6taoK0M07FhDmj7pzI/3vUaa1aseDKE9na1Tb3BnzCwNnlozpQjGpHH0q8F/uhA6DC5jMzh4CGuxUzHrVYA4lcJ2L7CtdLqAzvDmD3TctxNM5Bxyb/b9nc8wKuxi5oJ7id6pu8jvFRMTc7B4IHwPfXufuNpg8gFJj4Q4DBafiCPSsirIO0GytSkJVhkGWub0eSbrUXW7yTDQqSn+drvzSU0hbDo/bfhCeiQcnwRTK3G5vS2r3+clR4v6IVdXry3AZk7EZJ0+/BJM7JubQ1ZyNMpgkGiaBVPlx9sNDea087ZWR0jYHu5wfIk0b6fyqzjUB36omvUj1NasKUdf/KiwL7ff2VP7HwYEVCpZrilV4AhwhB2FipzoBDDIQ0yDl7WkLPW1Bo8XtrRMeakpAjFK8obdbo+7v6EJMkgyW0zkda+4excOcigDHgmcrqgIPyeyXrZokxOy4ko= 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:(136003)(396003)(39830400003)(376002)(346002)(366004)(42606007)(38100700002)(316002)(1076003)(54906003)(6666004)(66556008)(66946007)(66476007)(2616005)(6506007)(6512007)(38350700002)(86362001)(52116002)(26005)(508600001)(36756003)(4326008)(8936002)(5660300002)(186003)(7416002)(6486002)(44832011)(8676002)(2906002)(30864003)(83380400001)(41533002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +YGYlW3JLEXFLltRnAmuPE9N5Ho3Gt6Ju3djXxukYy3wR96J9o++VbuwWT887GcnWAozHW1VUIrqGtvOxKpwm/1Dsuc9dyTn/WLHtxnf/SmJgknR2YuYYtvEGU3HZsKuMUKLxBBfwCS3ScLUv9ZVqsQCRIsqzyNJChoPeRcdcGz6abf81L1lmX/nN3aZ1RdrlmDM6BEDLv/2MesGHv6VwmY2WOwpY/qnaP5oyShrzyXeGBC09F0zroIikVIm9LGcSjMMU5xagfTXTR7xRCz84mVPMKh9CVSJ/2Y3sriUU7J82uRzyClBD7DSLRTrKofOtwL1SOOmtNxzfQal2sHdgFEQUMA1JzuIxvppjF5WUeeUo15lHtd0HYvZeBHm4JDLJiQFbYYbqObwXFbZlWxtBFVpmSiwHBDRzgtLT0sKVdV19TRigT0u/eRCm77rFyi1KSxbvYSCFM1LicvWx4EeVktodjVFDjDbzX58RhtE0sqEBKvyddBmSzd/3CAZfULX+0/QPKiLLR8o7SJA/VqLLOkvDu5nDCK4vcd8gjcVfJKbTUpVLN3EfJKsB3Yba2a+F99VC6D2i6vleuY4T4FyYMkj88+HIKNAifcg6Lzy3CyWwOUa1DnfygsPrSR+x9eg6ygZjTxnh3AFs+O70ofpHdfZVQYj5cH8Y4HUAvGN766oUnvYguUzAcjl3bnOCpFKbxTP65bG/TcmdWJLMbJCdb8F5lyh8zqCO6ua8VaniDAIr3BRUiARtb09yZpq4aWv5vwddzCGmjvhowwuG6rOGOz3tkG/UobCfDQyW3b/cG7Mgd6KviSrknSo0ACqFI65SxW2413gmvA5e4Ir4HwstW3u7hsX2fLBqs2ZXpYzSYeT/guhTW9iG/A8xbqW8iLTZ35J/uWKCKX6JfLdEnwSvlJS8R3DJ16o7RpYnysvm11XjU3tvYunNj8xGGloNNXV8MmY/RnAzRti+vo+WlXhl+209JHmnJRL7t80k+z9NzsJmgWuiapposN3cIS4gTRc6nuE4FbVvE3XjaF8kL66Hm8pFnzsrVPRuQjup+mXMVsYuhQnObIsUyuB3HTQI5IJYpop1IWLM9AwNxL5DA912MwLEH/jKlDRvwpA+ryI9DYmY2exq4Rg4sYdmmsQW9XxPQiExhVGjvqdJ/bCWXtv6KMBNPwCNkC7GGQ9vmcMPVtRm0jfMQlpyaF+71o3SczEQmrzPRJcDCU7rf6WpGFvMwQ2Lvp+Ryd/DXL1OGBXN7kb3kgd+JfDM9aJHuWI/8/4TMajqEFrVDka1cWrgVgQT52sEh9QcnhDzuteawZb7ir/UMgbLbGxXDVUc6CMzszq77x1jTzOUvzGJciJIqNMFKkb6aQGdErK8FaZ8SUUG9/uBpgVPCjvaoC6YRTKXU3bZak0jiYcNqHmmbpj7sMPa64d8zWVVwxF7b4rWQfJsu1PQtzCJc19klu6uFBHxFjYipxLcBYkMbHSIvmNwTVtM16EbUTFF25c5+TG/zucVrhVHyHDCuopnBN+Vg5SqAfbWbyQY4NDhCTpuQog8kgEVMHAtC+7G0+tuLLNmHxXPiWwBS5XHhGYQ5RwJjb2HXD5HvzzkCfNtHhyLyi8RswA1PCV+wIJtoXRL51iUPVhS1G5aqVOSmTl+2FWfztNh6Ym9WcERAZUQa/0D/gUBaNCGQ== X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: a1f6fdce-98e3-480e-70cf-08d9ca889380 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2021 05:03:39.0541 (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: AzgwSZuzN3LHA2olpreozv6NNooZtsJycfbBwLlCZdVgZ8DZM+RIx0WRN+bVNfKhgc2w8JOEWViSQ9gFEQ1F5oDUKI7kEroNw8X1VGLAnqs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5441 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 | 13 ++++++---- .../net/ethernet/freescale/dpaa2/dpaa2-mac.h | 3 +-- .../net/ethernet/freescale/enetc/enetc_pf.c | 16 ++++++++----- .../net/ethernet/freescale/enetc/enetc_pf.h | 4 ++-- drivers/net/pcs/pcs-lynx.c | 24 +++++++++++++++---- include/linux/pcs-lynx.h | 9 +++---- 10 files changed, 69 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..7f509f427e3d 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c @@ -2,6 +2,7 @@ /* Copyright 2019 NXP */ #include +#include #include #include "dpaa2-eth.h" @@ -204,11 +205,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 +295,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..e36d2d2ba03d 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "enetc_ierb.h" #include "enetc_pf.h" @@ -828,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 lynx_pcs *pcs_lynx; + struct phylink_pcs *phylink_pcs; struct mdio_device *pcs; struct mii_bus *bus; int err; @@ -860,8 +861,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 +870,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 +883,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 +945,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 05:03:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12700740 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 1A1B6C433F5 for ; Wed, 29 Dec 2021 05:03:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231851AbhL2FDt (ORCPT ); Wed, 29 Dec 2021 00:03:49 -0500 Received: from mail-dm6nam08on2097.outbound.protection.outlook.com ([40.107.102.97]:64800 "EHLO NAM04-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229514AbhL2FDm (ORCPT ); Wed, 29 Dec 2021 00:03:42 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VOPITIgWsaJaBfgRJRJ9mNDGWHzWPtmocWmbIKrtzJbQTDul8fa00MrLnWoDrM+eEbptTfk8iSZaTRBP8Pb0lvR0WhIVRr7ai4Sn9uZB80J12+zltqEO+37vIVKR6AUrrGbHrjUKgwIaEMIJNcVVX6khqCbWCs5gYHYosP+Zb/uZkHNFgEpq79aedwgCE4czFX4lqpIvPcwe1s6T/oFvkC2PUba7F3V01p5EaN74PFsTB85YJkD5Jbuws1h62o1OU3y3ujzWgr3FImpVa1bm52GuvIk3PWQbX2XqSm3/zR2mZDnpGq1oZZT50emGXWILSlDC0X+vUmFE34WGLV4j2Q== 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=HZnWwcGqEY3ZuUuBKeWHZoUT5rX+Bk5YLCUHI9uXI+uI+bkAKoqdgX9/STm3wKDtZfSqWNmMcb8XFldYqvBkqP09L+BKOX4GX+DaO+gkEls0VsNCOje8Q8HuIAj+vVycH1ZUQfrecjJROkw8Esa7fyY86sULECK+NYyrUjaWryhHgbYmlgBMq+mBEGQ/ec4Q1W3hJUfM0YFumK4mnu2wZG+HuIZHMlgS6PvwCSw1/freXOA+JIFHLHFoladQF64+QBFQGj3VHqTi/zzfNS7rOuq2Z7qyb+tJrWQGeVEHNjjIPIxTdvBTgg7vAUvX0JaChS9a1Pt/SBkP3HTaxGGz+A== 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=HmxMXe6dswN90b+S+A9D7rGfA4mv3yYNMcjO19hhtK9mJUdMldIVQBvn4wqwaSaWlSYUUqMpPX6KAhUOVK++zKQyptFT6BavzXia6TkjOszCz0omQe64wOzETqzqbLpMIrvxKPeONH7bp92TeBE3qkAqRrHC743r3rQpscARwik= 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 CO6PR10MB5441.namprd10.prod.outlook.com (2603:10b6:5:35a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.19; Wed, 29 Dec 2021 05:03:39 +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 05:03:39 +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 v2 net-next 2/5] net: dsa: felix: name change for clarity from pcs to mdio_device Date: Tue, 28 Dec 2021 21:03:07 -0800 Message-Id: <20211229050310.1153868-3-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211229050310.1153868-1-colin.foster@in-advantage.com> References: <20211229050310.1153868-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MW4P221CA0026.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::31) 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: 3cd59efa-4b6f-4385-2f77-08d9ca8893e2 X-MS-TrafficTypeDiagnostic: CO6PR10MB5441: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: l6uXPwvMUGeEbL89W9FagR3q6TJYso52vcFwyBxfL9ewbx1owgiNq8Hpq74y6TgB+CG2sF53zp38luGKmAkGAH9PXS+RtlN2b+QuWQYufTFzfysO9GujTQBjr7Vc5AexwODNwhtd9QdcBXN0/rJfsBuhXo0YnpOvCgSc/ISa/5+XEVJ8uUqSt1jf5FCUmkqkiBSHJ90YTUND2tLRyMAU+zppkrgiuo4JN8nQXzpqX0/VhYoYg+xmXcqgOvEsQs1eyDnJ2X/0ng6cO+nY1Dsi8MSY3LI0NakI7wWKuXetaMcqIb618FYkGIjqGarr7xoPLdl7hysjrGA6Jm883O6tPWOateANnTEoICsKujNKBUK9WAZyyVbfLLpkaDIcoC529kUA7OOMNTSJhPr+jF3I2TZvVANn3PxzVjhExXJL+S51eYGVKcdSeQtBirtX0i9Zvz//iajc5LgAVT2AEGby74pSjhx+Lit1T8XiQi+S0zpHo0e8VSA9/YuUZ+OdJ2XU6ZKP1nJcPVSiHisqjO/3LWlKN4r09z2oQDR86JdjFDUqb7oHcW/6D8HTis6bQj1aV15hawBKQa3xNBMjxWkAsJ/CCYvnU+yHpnpIfFxN2PMj+dRGUNyJne3UlmZ+EU6f35NJwmPUO7YmcgAwuc20+O3vxlqpwxsBBT7rwf1/l6YBIzs+73JxXtRc7yBhyiqegdz+xa2DwZGe22BV10W15g== 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:(136003)(396003)(39830400003)(376002)(346002)(366004)(42606007)(38100700002)(316002)(1076003)(54906003)(6666004)(66556008)(66946007)(66476007)(2616005)(6506007)(6512007)(38350700002)(86362001)(52116002)(26005)(508600001)(36756003)(4326008)(8936002)(5660300002)(186003)(7416002)(6486002)(44832011)(8676002)(2906002)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZRgDkn00w2mVf1bpiAwm5LiPrQen91sHGMgTD1YqXu2fqaPQryWbC0aOsIdc06tgspK+vuLUdqpD4s0S7bfU8+otAQnk8jN79H7guoPh+M6lFDW3Ja+H/WIzjP7BfXwMHK9ja7cmNjRcMedHzWy85JqEb5Ex94suXiXBq92UxPP606I57qFeg734wctgbr6fm8aM45P8/3Myj48Vgf+MuZ/MbTh0woaSfZYBedga4CO3TClrg5Xlqwe3YNzGweYh3g9raJ2SOeaGqaP89KANyxOJrjorA5krtpsTFCrEccWAFFZmQNYAnRrCq7N8j6kuQVKw0QcZXMWy3Epb6DruDDb+mHouNnHO32GZDuz6dip04zCfYrXsBXS30cJh2CR62fKIm3SsiIPQetg7pzWoWCQetlfN3CCd0ldjCme7VVGhxUI7FtOlUQvsDDiBkpXqGQYqHAVjGGrXmTRC3nG6SMNHXD7g3yVj5x/outsr2Ogb2z9L5fV/EP1g4jtHd3g7Gw/XD3926ns5JKFBZ3ND7iU4n3zVAavZFX6mpofIbLcdaqgRQjRWnhMU8uTdSs5D64Ys4qJeu9QXSGDuc36jksUcv4NyMjcWZPBWuCxOyCLY3q6VmIJ5YmnugtrMyrLrLnzkeWOZ16A1cVnrKItY7vtRzpca2OFWhcl6mC7TuPuWZGX7mOerHLco4QHoV4EvcN+TCrmFNRkl3ztxcaYKBCTn2TVTZuDJOnLvqoh5z5im1dafcsXdq3CEde+GIP/dks5jEMDXu71khcYH1OBX97CtTyle6dpnK0yKGtwg5pciZWrwfdQbavrPfQj4oCw49T1KbZk2wlMFIjyw9IIMA8rQlvsa1Zsqa9YE3tPAgsaOA2gWiJG5vKJ26nEfv1D942IDMW2l+uh5qBahMFiNJXGWevccKloG16lCxrOjt3f5plRcNatSZ932hlCKwbIG+ZttrXobAIHzS+uVDWal9BjZNvl6ZRWcNsyJu8R6+oDBIaK28q8R3eu+P8Vuh8hDyBjRXRbAdCTaVK96vO9Mfri665Y8AWkNBYy0RO0a99jDYVlWz5NeinAyiIGJGT8gSjQW6n864Z9i+6pajIlrOGRyaG6jfqs0551WFIRMIvDJh7QbI5mO8PdxKqPluPPN0Sn4NvVxDIJbIVEtc39Xw2JsGHuAohXcdSqgzWepORsunJKv5rLKzdWoa48EQn+wm1pD5Gxm7j29io2CIJp16iz5vaHdJ8jPUU4BufaHszMxnCMUZeZUSq/edaOmo4PEPs3ibzb7Vkv6216gtoFeMYfntvdeCdI8Y2unORCQs80lh00T82W2kiLvelQ3nbXZ/rT7eKnaXPhH923uC5R0m6GAM5VGN/T/jaI4FNTWMi5ftQNjejyaNxAvXU8lNiZVhzi0eMlSQ/irIgHWN2wNzNia+sp47AYQssrxyHZxuBV+9fnQyrNnSyr6oWPmgxPM9qHBLEGIOHQU6X0AP3WnfE+bUfgkyjzsKlhxKozHQ0pwg9kzZ/35AEPNKWj90ka4W4+WfShvakQtvz7Jx+hN/1K+f5wwyDbad5q4AG+4aYPxvN/N47r5UuqexYwZRIbILMwznsqvJWuDG/riNZVDuuBciRGdiZIE33cvSUIbOQfBl7yA70aphiUJq3iea5k39WxDA86rNoJbplcNfSve6WO2igtRcsCuEM7oT6LaDy8= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3cd59efa-4b6f-4385-2f77-08d9ca8893e2 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2021 05:03:39.6479 (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: PLcNfNf9N87P991h7r2rwLXtEedo5f1VhY1smLcYqmWnhPHFr0euyYXkqyaZFWCitZaO+T0pNrQ9FTXBgSKGXYVVt8o8a+er8puqQTIRxiI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5441 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 05:03:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12700738 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 74CAAC43217 for ; Wed, 29 Dec 2021 05:03:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229691AbhL2FDn (ORCPT ); Wed, 29 Dec 2021 00:03:43 -0500 Received: from mail-dm6nam08on2097.outbound.protection.outlook.com ([40.107.102.97]:64800 "EHLO NAM04-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229507AbhL2FDl (ORCPT ); Wed, 29 Dec 2021 00:03:41 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NBQmtydxR2klij9HzC0SRdXfnk2O8vJ+XnaYPAfpI9yYbgibo8EA2EhIvr4ZuynRiU1YkxEJBObPv3NjR1pWd6zHso7DYYHJZLuPTgnQPeOF0LowRE0FE2YWheKgPsxsxXTJGLYk+33N8cKQbLJyukKVPDIYdszFESuVqsotQNJcYzgJRJ6lK2nd8V/GvthfYT0DLUaC4D6Q/NFN0iiKrzG/q/VX3+y9pczhiBHE6FBZA3yjI4g193/fsW6tKLyblsjxFrhx2kIzAWFcmOLbn7/lC2tlxrHjI03uBTLPnUjGRFYTNN11yAxuchHyJWAOAr+/xKi+Tg8033GgK5Yt9A== 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=fXmsr+FUtJxHREaJULKBrza6YkGYSuZFU4/fTob9TG+Pu78K2wGYX2dfNqEFFQxicJ01mxgPdxVglX2VT+hwST7calA5oLlmW3F95NxNbgaLP2+/MAeBH24W2/XssLl0TQezQdW0wN62NEJteRF28DHbJt1bbaCivTh1SYvPRIMjl8wFeFFCZNmyohZrDpqeSvmWpAFzIU3vmfwv6vpmAo2gvqozsqe4cxq/OBSXnY/Zli68Vg7uysgA9ultSQKxyf9yECRZFPt4pNuqzJSW92zA8g7arSyChQgojb7rUBpEqPSRR9tVWtNqlI42nZEuzt0pcqo6kYgnQNcH9IsY0A== 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=IZ3vOIa5FyIvzDs4QDHvHGNI10Bd9HyvWhSrZpzYoRmIdRbTpDfSL4nbxlvnyA9J3T7WMhqsW4oh4yvx4tNo6dJP7tU0nNT08VCQCoDU6+e5FosN/R9C+h+6vgfXb2ov3t5eqQS9QTqlHERCxh0D+7e20M91JczhXVrpEcy+d0U= 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 CO6PR10MB5441.namprd10.prod.outlook.com (2603:10b6:5:35a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.19; Wed, 29 Dec 2021 05:03:40 +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 05:03:40 +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 v2 net-next 3/5] net: dsa: seville: name change for clarity from pcs to mdio_device Date: Tue, 28 Dec 2021 21:03:08 -0800 Message-Id: <20211229050310.1153868-4-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211229050310.1153868-1-colin.foster@in-advantage.com> References: <20211229050310.1153868-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MW4P221CA0026.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::31) 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: 0de969d7-7b07-49d9-0287-08d9ca889438 X-MS-TrafficTypeDiagnostic: CO6PR10MB5441: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: boUZaxuTBAk/NHt4sp6j+UM6ITCPGkOknhR/etQh1CkkDBfnbrixthsTlisEm5tCcNbyBrwTLvHRfHxirLNvXwuOJyz1xspZCe6MihVJ1NzppO3CQJYmv5iPAaXuIBUS+l88bT5trabUs6QXXKUo2ugXTZWiKTmFclPVaaiR7igrOT8W5EIDxG1k0Vel4gBRgedw6ETHm+MSz/kSYu+zG7EUhjlTD8N2r3snFOn6t1nKOkDKNHnngrl07k1CY0pl6/4jAfk81pH19fU/vZstXSX8tBPKpiJDEyTaGijATmuQL1S5TKJbGsYZeJm37NDu1MWkCEmMrtplb/9VYGmDMgcM/HXkCa2VxWZrtCScVWuSxcvQbGJgLCzDHBDojNyXWmsbmauB8YAPgtCy6ao49sSR/ZG4WkAeXnFBNoMLXiFCaCyr7OUq2BcGwubmbskfYIEu4/7e9lGY03tv0bMgiagSFD+/VBEdAJq02UKaA7aEB7pkEjl0I06mKTqMwfvo0Dycy7r2uXfmgXaRh+4XH3MF9M7mq01H+x+uqZTHet91N99Mn3qAYg1bsVMUeB9X1g13L7zAPMEV1KmwsA6ieoXqy4qBDuRdtUjKRVX1GIxo3Nt8sNZUuh7mSv2IWu5mEV+0vQdSN3FYdUatSkpCsGk3SYo9ucySIVvHhBJdqVHJyOdh6fkd5A83pXsNAJyKK31RxT1vUcfU/xTx9wcUlQ== 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:(136003)(396003)(39830400003)(376002)(346002)(366004)(42606007)(38100700002)(316002)(1076003)(54906003)(6666004)(66556008)(66946007)(66476007)(2616005)(6506007)(6512007)(38350700002)(86362001)(52116002)(26005)(508600001)(36756003)(4326008)(8936002)(5660300002)(186003)(7416002)(6486002)(44832011)(8676002)(2906002)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Y5p5y310h1lUeMDXYG6tYYoDWLT3c2q8qbsdvxjoH6P66Q9C+DK90DoyEKQqIva6PHp9MMPZzPsyQwjEeF1ieOLA1bNxIWIo+BVFHHwJ/jssTdiO5MUkBT3X0VMt8JP1sWC2nXHqnE3DVFe6x6U0G/PRewiVa1vxfNoOykMeoE2xzLsrVEWYHyNk/shrJwQ36NcdLTs1LUYHiUY4DyAbT76clolj67hzimEWr/AhwO2/W1ySKiULb8Kl6/mPgxcUQGoiDIPiTzf/9p1To5XpvBSpgGYyEQOSPmXn6jzTjjF/gk21Gn4N8283pXbnK5V1rJ8hBZv6nLrG6or1eEe2A6dPmCDE4MNsffQRsKV38t3CPB5rUG4pdC1lNAqJxklxWtgF69lHAdsTT9mSnJ/QKwNjSPppgrN8S+9yBzcA6EH2WjKHlx76KTMRtJJ9VKm4SvvfccQ+V4raPKvHzWDfMFuQPmUgLFTJQLoHtzZRRzjPtHjQQU1UyKhfSd9wgtByE9be7lyqoIIWwju11OJFbWiU9XqHfhWCYeYAVzzLWJf4vCd/aL84p410RkDMPl35MmIbVHpV4kqSnGDTHVTbpDx5FbOtmcCfZY74XVdEJcRijd8xP9qqNs3fwQuQpOZh5MxkPWVN64J+ob4oKWCjVuxwtBwMhjIpmZn5qKOr2s66iGHee+lQZeQgyJFw6qVeWVO/+kMQAMbjXwtZNEK0XCP+krkBECluLdPrSaT1T8KmckuwWiTt1PrJOekWHGBPsbkb/IxGAX1A4RAZBXrDt4WTuElkSqaFDUJAM2CegTGNyVcfGqGYA9xPhMhxdlSfzZ9EDMkTx0rWWAIZOvM0rSIHoZkgH4lT86H1O2syr28DdGfR1ygI1YgOhNpL/44tzQF7zagmp9ZizEXMjnCZUcoMzXwuLr1ETR/KP9f1TAfs1uH1xt7zaRY2Qu6H4EGTRP8t9ijQZD5T5w/+67CYmzEeI9s4anjnDtmYlin/HE/dQd6eZ2T0Hu3DmpQjnmwC+Jday08vfObsltjFj2xK5V7fOSC8lE53VBWtIS3Xjduv16CndspnBBz9PquNRCto4JG8aHFYXfBnyTZ+KYfTnZj8MiX0+L50YFekWzsmkV0G3Kdy1x47zrejgcBOH9sYw87+Q+F+PL8X3586po4/bAmrF+mVXZZd31gGm9cS1A8yFd9U4+XScTpJtmwD/cvhBwAGSZOK8KG6vLk7QlbNc4RplRI8r25/TcKCOQr4/nF3HMKp5QXDiD6iYUZWeHueYZHS+E8s4TDww+5u5Lef/UjT5ja242jCjGtqA9A8u/1jPm8WoBmKNDjKP2o2kL0uyGHLoLWsRkUsN5kUl/x0VK28D3PS7Y8UuQii/kRi2zwxua6Er13CuS9VhLB8shjcWsaJebBkAGoBfndsetCpGP94PWx/N4YZbn71RGZXYbyp+Keu70bCkQvMN/8Qz/jtJqAVnFo86gVtRogfj3DGXQN2JZH5bGNauubbUrFuWkQojuKMH+PBdAPFo0avv2/Eb/ieDgV8P8RkHDqMFzVaLDFgjSp0cU7U6toLEMX0MU4RoBPUYOWs7MorwdC9xAJ2bXjboeAw4cMm9iCUYi0/cR/rjOsV52HjfCQcp4f6P9zKobM8u8W7vwpNGuy7XNYWe4zbvEo3D+2eqQS+Vnw/sHpIn76Kgelkf499ggi/fZ4= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0de969d7-7b07-49d9-0287-08d9ca889438 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2021 05:03:40.2103 (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: ES9PLiwn84MaK3FYkQIACB1FOv9m+/+hrs2iQ0LQ1KSbp47qRtxN0px/dw4tbei+06FAZTlwoZBbWFddmyKdEKLnBVlWFfOGZFV+U9+7GEI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5441 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 05:03:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12700741 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 1364AC433FE for ; Wed, 29 Dec 2021 05:03:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238757AbhL2FDu (ORCPT ); Wed, 29 Dec 2021 00:03:50 -0500 Received: from mail-dm6nam08on2097.outbound.protection.outlook.com ([40.107.102.97]:64800 "EHLO NAM04-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229871AbhL2FDn (ORCPT ); Wed, 29 Dec 2021 00:03:43 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WQ1+2+6sPKeMNDdT/ptxFQ8gomDTdIavt3mqvdk0GmZ6Fz2EVUUzyTAmn7tX09mJv+ELmCZA3s+a1YxvtU1xodTQYxIjxFDX+axHTRXEDR98OxhP/jYUn3MqyMbdHCcJqWRh91urazGSuXvdCqd7hZzy8Z6DLXMo+dNg4TkNu3ze9dWc7b/gADf2yEtJU9lnBPG7G14GQDtMfFYfoxO+9Lggs6MvD5r/uRzB9wxp1JyT2Zt5JVK4Rpy3LMkEj5r+YqKL1ka3xciQDhvxSanfDzXNU4d5dSU+nhfcNccTLQS3+44WL1fNj0Y4CgS+wLpBuDbA1/I1xFrLagyz5hBYYQ== 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=b3ytrGZq8hp3eblVUtZmeLt+/NPygH4U5QmMt+njLZ8=; b=XGX0M10jK3kTDHTcaqwlMOeoFBjO++pXI42GUW1UIZj2qXHBGIRl8ACUZPhpf5n/AJkMvdVfqz2+FcEFd/EDGRLpaLO1iX53LVyMhZd742aweOppdVw1lQgZYwc9EEvnGdTe+Cdtx5kQlUyIfebEJ9FahLsMMHt2S0qAc+grr5j5J6uRU7R+XrSkdBwPvkK7l7M1BQ5Sxij0owV7j9Fn8IFhHe4nq37PUfKY2BAiq+XFVUBeyobQlsEHG9V2dzdmB9usBkInav9lUrgnT9WKU8ljNrS4slK8JZbn/KHjWqWlSQtYJ+3igXPbWtEiLw+0JzPCpBXFuLi9lK9TGiHm3w== 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=b3ytrGZq8hp3eblVUtZmeLt+/NPygH4U5QmMt+njLZ8=; b=tR6h+NQtKRu0+Ui3Lqvtb19FK46OfS7JR4k1ETJ+iEmd9/WtTjkqDjYc7F8TeQC+9LCSBENSWlS4yqvLS9iEXsSzrO90ij5ZD+raE885e46f1PjcyVAkxw6+SRQhmdcO+N1eggyP2gNs6DMxMszjvw9cI1QUW5zKaKUVv6cZSNg= 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 CO6PR10MB5441.namprd10.prod.outlook.com (2603:10b6:5:35a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.19; Wed, 29 Dec 2021 05:03:40 +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 05:03:40 +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 v2 net-next 4/5] net: ethernet: enetc: name change for clarity from pcs to mdio_device Date: Tue, 28 Dec 2021 21:03:09 -0800 Message-Id: <20211229050310.1153868-5-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211229050310.1153868-1-colin.foster@in-advantage.com> References: <20211229050310.1153868-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MW4P221CA0026.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::31) 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: 7f3aeb91-fde2-4096-37e3-08d9ca889490 X-MS-TrafficTypeDiagnostic: CO6PR10MB5441: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: fLBgUvGCb9Q/TQhFirF9yTxmsxTZU1D9d88ZSWIN+x4deLoeeyieJfvtc54gqZ3lyAixpUAZem4oIswEeHS6VDsZa1t2Xagw2605gh98RkL3az0LqGLI2GLEXsjUTbaSDX3zmr1QaeeZhr6ZXgMXL3lYJurDUL1BvnCO1dmUOBLVrrX+g9UNistzHy44Hg1XkIb0QmUUN/cidWjFnwyZZl9URxDbhZUBg9PFVzRvhEw/MY0yPFugRIO4xCqKs5dgwBvluZLp6QBlymRLwkM6u9eNlgdiwblQNKIp+dC4Jxm+IxNztzhhUa4khD4k2aug70wALRoYr+XrAKgny6OBKJMKq4ZyFPbAdx85XrbC3U4gk3vcrgpFhDKTqy8G/GlI8RlAOe5bcIfJVF/JtVAjhIBEx0U8czhEruuoSOyXv0rfpbmnPMNetUf3HaWxl718bTcKYPHlqaClPt49ALhq4uP/5lCglxxAklM6EyHdCKiC9jo+NOUhyiSrOHuXGDkNcmmURY2Imj6Tr5MgmjIeWQ4eo2lpgOo9v5cBV01ed2yF47zuZqkZIMEmYa0TSIG3LtRkKEEcTdDvdVpxJYPl7u301xVbTl7p5p35j+ZQCK9pCwKc18EEDOjSVYskyZGM/SVeEZCG1xd5C42KC0ihQIUOd8lTcqxjNyDcXJSTJ0cz/kysiHAyMcLc0/9q3IKrM2qMFQ9T+lCa/mhoXbUFJA== 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:(136003)(396003)(39830400003)(376002)(346002)(366004)(42606007)(38100700002)(316002)(1076003)(54906003)(6666004)(66556008)(66946007)(66476007)(2616005)(6506007)(6512007)(38350700002)(86362001)(52116002)(26005)(508600001)(36756003)(4326008)(8936002)(5660300002)(186003)(7416002)(6486002)(44832011)(8676002)(2906002)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uK2jt8hDZ/zNhP/1JYr0ZuL26dI4S6RMU6AQs6vaN3+V45Yeu8NLZ7b7LR/n+Ia7tw+oS6gY/ND8sa1y6DwaCY4Yv26z+FcPqUrCCukhalerOxy144BulWsz54nWhCE2z1xc9qlM0GLr7kFV8d07yeROpiapZ1vzCFGAhVeldHBacfelISxPo0wfSwQmHVIkqH3YEOIYGim8RGTEOMuLMjY1SkrgI4iDdx0LAWtHp7JkUU+4730Zk0Vri4YKyxQs8JcMGN4eEFMXlgmz0/9MYCEm8zyrNaBlk3Vg8Mg5ruLjxSvhOB49SRNpLZ6XVPMRXx3KySppRf5OoHdC+j85pfxEMqrMC2IgGeq3TWT9FhISZkjWBNrUkOpT4YDfCalCM/A4eHj+Ua10/y8Jc2ps0RMo3URuTjZxfXRItJNb52XGRMBjGkPry19fJNfzWt6+vsb4ifn6r29V2iUbUqM2POEIBz+JJbdiuWR3qhk7mICDuDvcMpB/HdYErOP3RX+Xib4HaUeT8wC4IL/rs/zOnKlvnd2MemCwNLEkmZanWyj0XyXP+J36DR1aCT5oVXGmgO0NAxPeeJpS551g3jZVq0Z/lL+Ud9rZnG+MhzrE7tBQSqmPGwVAqYhJepw4MT/3UI2YQAAZfquChsZjKuXA6/Pa7lzzOvchdGvLq9paqyonlUdYlzfhweAGztQ670A1HQnNUPMRVvdR1WCZE5AKkdFoHYFJJ0XPLz1arH2IQe90EH1jVtdgkaxIWb2iwgxGk8tewgrRPvnYi36zUaIgGm2+FtOEU+2DKYtaa3D2YPAg283LBowRoujiNmlF2Mdd5KOE7czSSANZjJjpIXEAu4ZBPI5lqLuqvUrwRSCPPmV8KsxzfV8crL1J4tDouDsmdC3+6Eb0NRZM7Hh2pQ7FHEN2bDc46s7dGxvRlbmYL+IAmDCAaWajBtFujJxP4/jDZyvoLDPlLcOLoN4kWRsg0Or3Ddx5BK3d1nseg1nK3L8cJPE2hBFXWR32pPI01b3OBnrgx7VmlYEUX5CGjBlgBzsegdMhZdWe/+8u7SVr8yUcwiuHyuVSmFCBa350mP3TKXExIdRdUIUKt+hescFZ3gL2aCH6BEUNOwdTRwLmBm3XijlAQFn6pz0E8D6Hcm3oWZ8n/SPKsF4Fq7g7u3m03UmqZUzjlY6FEN4YrEmYD+yJR7fExm7UUW3Kq87rqYJnf1bwpDAE9n6LGWCl8ddVu9WHRNdldvMeTlDBv9aFVg1/DWQfx8vtdMRzRMkm5DhaOJAHPsryrb6bjRboj/7UjFu6nGckBRAhVqdzyceKqnPpyJNCG8e+xbEE5BRL/+IgrFwwVdIdNh0wtBJRS9SU3gF66i12JDl7OZ0CyawHIKL9naTr7aF6xTBGdQHA47NsPIWlIsz53Oe4OLNFe5nlvi6d8p5gG2W6A5mvM+91Vl7WrUsi8b5rcJmUufzJy0jSM71Qb+9QSYBp7ooSUlLBuerJFu6gHY4V6nO0CeQh2JwEIEcT6Q+lh4NoxpPRhDeVSw6yWWnCLoipbXINBqnpcbUM2jyUhdmiAkcLfBH1YdypCVH0QMgCAgoIJwhSBNhMs51mFquDGCsJmm9PHv4FgjN73tq0pFfSefSv4Ls57PAaH6J8N5ll5uWNUX+aLhglsPLELMdtNp5aZPKRKEf52ZGxBUyoUQYhqBuXrn3bEW4= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7f3aeb91-fde2-4096-37e3-08d9ca889490 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2021 05:03:40.7884 (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: CdQs5hzAgmrc6HendciQ5/kIwcAan0h926C3ZT2k8iTkyrzhzHiWvxo2TJ3wa6JqMpwfFvf9w617xbPsoqjVJxOi3rGfsR4Ep7RDdkScmf8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5441 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 e36d2d2ba03d..ed16a5ac9ad0 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c @@ -830,7 +830,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; @@ -854,16 +854,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 05:03:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12700742 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 29C6CC4332F for ; Wed, 29 Dec 2021 05:03:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238746AbhL2FDv (ORCPT ); Wed, 29 Dec 2021 00:03:51 -0500 Received: from mail-dm6nam08on2097.outbound.protection.outlook.com ([40.107.102.97]:64800 "EHLO NAM04-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238747AbhL2FDs (ORCPT ); Wed, 29 Dec 2021 00:03:48 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aBR8F+M60Xdi4ZCNJIY2uGXnnbiP3zaK4R4aIWMU37sDPA9YHMpf92odjRz2h6ch+OYB9SNPFcmaRhqxcT83z06Cs0q71KQn+J2dyLPSsh6NaiX1oFcaqwzjMz/Ywy/zWOLf1o+535hHPkafQDvw7XM2dhuk+YHLDmcDWqgbwGKSzmM4wLoEsYiOTX9lWq7NhYjqrx/XGH7do658BzBvygHWGOExF4RIMko6AfY2X/3sSMaSkk2/OSCIwGoU/jcnNuN1ffltx/MniTQexYt5i8fE5ftQlNzVzL22+Dy/mUF+Bu/byTgPfxZjO64rXZOUJCRALUstC8C2zDIP3DGmUQ== 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=b4/KvIwmZa9pMuSuGxgkoE09B6f1VOCA3wUFQCMHMatC01Nc52B4VCQ1a3CtCx/z+jIDGLU8NqwHCQ7sggh0ZYtobtzVVRKBi73XrG5c6E5AlwEtC4nCa+PAAIWu4YUuqOtkq5j89DdfA4sh0NGP3V90yhoJgMuZWE4Kd2EWQ+yQ4woBHFyoRBwphUanhBfe0nmJiGYd+1B2sZzhqryNz8gb4PmS3VQ+gRcK1QLbc5kcxmrX4/2Y3KZNJEfyxSmKLdSqWRljlwzmZQD5wNvALSGBXk7kcrKdmCgKgVGqSmhOVW7rgRyUPN5kgMM9it050j6PQsx92OlwjmQlY6R/Dg== 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=IR9D5RR2kAE9Yf5YSaXzycVyB6Or6QdGQUnZ+0hvCuQprjszYSWCacSZHUPAURIKqGrBvm6s3WELsHtta13mwn8r3FjtPJfuDUK3Itli11pobnIZh+f0P+OkgPMoqutfCBKCJTtuaEcjgVXesyrqPP+Hy8+gcWlB4HBrpX94F+w= 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 CO6PR10MB5441.namprd10.prod.outlook.com (2603:10b6:5:35a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.19; Wed, 29 Dec 2021 05:03:41 +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 05:03:41 +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 v2 net-next 5/5] net: pcs: lynx: use a common naming scheme for all lynx_pcs variables Date: Tue, 28 Dec 2021 21:03:10 -0800 Message-Id: <20211229050310.1153868-6-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211229050310.1153868-1-colin.foster@in-advantage.com> References: <20211229050310.1153868-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MW4P221CA0026.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::31) 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: d6c74d9c-eeaa-4c52-6d55-08d9ca8894e8 X-MS-TrafficTypeDiagnostic: CO6PR10MB5441: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: 0evBRd9AfcggJ2fUyTZ6tSp5jtzTuAr6NHSXHP3ijk67g/5pAdb1cpukBc5hr6pyOoJLLtnUvgs7XbLMVLSt9H5zfTLJzxMVb8GhCX+FTmRGCVc+Iw0u5Sm9kOyv17V+kCaHyq3bJ3MbmgN37TqQOs9QaPZXwVSsmVIswBgmlPf8q3CprVLzTmSptkMfyV8q+JNzzKxSQHIrNC/iPFatkHPE94lZA+BNstdlFsJC5Rm9X7DG6/nG+rvfIbwdH8cCIyavhL4qZkZ6+gfLyK6zzobAs6OjgSM/bBRmc35za2k0Ik7EAxzo+NC8YYeNCyyVDCDA3bCOUxqBzR1wAaHoDbmdfrjruUkj62PE5lAGdaBKIS8y0A1yB350C55B8HtnRd81ptk8OnhrppEs4B/c2z5DqmwWateAxUGqX/fkQ38oVk+24xmqAvtf17r0OMDnQmyCpXWbKJ3xtRrjsCE4WO3lOWGeA0DM0F8fz5htrFcMpNTIIy0tITl6UQzf7Ch64L7IYdnST5jiLbVI/4GMnxAZcVsNeK2uLofPdyMbVOmkVwnXPwwp+UetPRqHJ9RHsLlKH5VP8b/yumuQgFrtEQxbBkVNIEfZ6D/66EAmr24h6krFaJ8108q4EhVjtFHCcQwitERMM4HEQ9yY70i1bqJsu5tOCd8/APH7Y4v+E4e09UMK36LUnTM0ibBjo7K9X6ODp2ZfFb6znl0UJgHLIA== 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:(136003)(396003)(39830400003)(376002)(346002)(366004)(42606007)(38100700002)(316002)(1076003)(54906003)(6666004)(66556008)(66946007)(66476007)(2616005)(6506007)(6512007)(38350700002)(86362001)(52116002)(26005)(508600001)(36756003)(4326008)(8936002)(5660300002)(186003)(7416002)(6486002)(44832011)(8676002)(2906002)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nnsebXso+TZI+4FtyKK8dfPVyERSXSeITBWGj/dWFBSwXgGLBbHJ1QPayHZR8P99j5g46YLLkv7oGoZHfMiCwfv6XvXFIaJ40xyf2vLEIc5rAFDbGbSaP0b61HRzoHITYgVzfjrZLxDCegHP3sP1CnZ6z5KuPVvLHuumR0+BiNRzYUppNpci5p8ytOmbX5BUiNWlbYf/ooEVFcNlo1NRPquH0YNDbPywFW7rHfrnzUe1evV0VwhN5tfEmfzFWy24TJxL6EaG49NFnHf4mmcGG6tDNsTyNmTtc2RypeO2SRrhd/+VKepHQiZd+tomY0nUG7NNYJ4hYaUlq588e42fKBiTwxDPhUq5GsU6rdh/OGQ4jQ3jJAzBQybpH7cd2sDrVrc36WItvCyfqmtNGR4qxnZgFNi7jPqmdXb0L8zwIrfAwvnpf2ddOpRmdCBXJEKcx4tTLfg1LDUTzkdwekj9IW1dYW1LFV2nfamIitCSbB4PjPJMEfw5wSOKnwxNL2kWVQRPG4oLaCJ4TeP33CyafWMG9KB2/vJ4ii3dnC25KMXFyEEAxxpUxHtVB1KLO1/AoQrZSAmEH6pDIcsIapY4KDsawZZxmUMuiXtHcAYOVM4mBKBbOwUx03+mKKF8ZelTUNQozzr3OZhYUrwEhx1OYxgfKXPdPzPlPE3zCadZ63PS7jlIv5hk4IxX56fCFTviNL20AovMRHgJ15uDO4LW8wWcBoDTm7WrOaYO9ji+bJ8KRCCyM0iaH73amXuEhsxMGhBhvrwkcNgl9FSCzoLtFK7waOtO0Q+kA0E/Afp7SXRORABsepafJ3Wiixs5qpfldbiJY2dloExUOzEgdsFDNWmP7OrYRJBSoaXpF7Ay5Nfhrrwx93iqCGSagEHmu+y46onOywjPhf2TUGd4HoBFklHMqU3c2E8amkZvT7jjPtRLSUMC/MH3K9gyvKhyrxDnYcXHmTP8bC2sxeote8VcB6VEJl0vDBZGtvQAhJ7CjdYRoG1spKggxFrdTgUI6n3fJBV6n/Ul5KBIoFMCmGGJ2Zi8/SEt6fkZqd05gE1BEQiLfK3tOD05CK8DEwn+XINbJwoVKCRyxJmxhDmUf9iOWJS5jdbQV+B8sB4ZGIwxAJi9k+OFJf+8v3E4tXwYnzEoNHbb3GB8NoR1LB7JnSTvvd5+ryK56UQn3QNmZI6s04lzTMHPbKYnkpLQZF2TvtBKB3zqEGVAqzfAF479yMbmpATt7iuZHP1NJvt2uxx85wp48NFAiTJef6QzddC9xFCmaNoR7oKpsDka98BL0j54ikDyHsgS1muW5GpBaPXWrVx2cs4QuxdiO0/yozDmzE3y2LLqm1BRcarIv+nefKZaUZ+kd/BGpuYCcK5qBFx7bnnnd/LfWLoGH4DmZtaPi1XsLoBCx0wU/5BIpLh+cVMS6mvVOqbfyqcgVgHpCkjVsf0rmOMDkAP2sb5HVv8fz+myfJ7WTGNWaJ6ZoBDhSxPa9kFYDMJjOI9IveoILVqifvRIZaFA+QH8PL8P0kiiIbYjgs1yTaiApxvtzULmTSKI6mwqYF738qarskVSAzwM4shHxA4eCt4pY9SlVRfMg7d1BxSbVvy/B/30bzH5f8tsjEsTaSsf0kIGibgYdpcsvpSCzmyljfJ8o9udA494pzZxiwiuwbEExnID+Xam491LIOvmnEi2uETQWVTR6pY9HLo= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6c74d9c-eeaa-4c52-6d55-08d9ca8894e8 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2021 05:03:41.3509 (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: bPkmx5Tomlk9s45CTm/gcnON+xGpD/moOzT7Ycq97Ma2BcMInIoP3ZxUp5sHSgszfbVazVe0hcOea2sigZ1a4Kco7ooylRdzz30aLeYxGcw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5441 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);