From patchwork Mon May 13 11:53:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13663385 X-Patchwork-Delegate: kuba@kernel.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2086.outbound.protection.outlook.com [40.107.105.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2118314D2B2 for ; Mon, 13 May 2024 11:53:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.86 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715601239; cv=fail; b=D7OuJZPeCoG+89GhXgEgMUyWBOsFmgYZmSaPmhw1I8Yru61d5jJHvuIZwfKCKTF71qeLLV8teB48WELY8L9DRw5jXFwnVso+TIlrW/vTI78U+7XKTcGJ5irX9aSTDsNVmpstvish4YcCPZQvzNx9XrFPtz6PxPdd6QJjmEal/CE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715601239; c=relaxed/simple; bh=XXz4Z9HHDK4GJac+Aj4BxLT8GvWpauAdE0pBqqbbWZw=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=gArZo0s3SSn+BWXcdxg2ne4ZX9om1C4GWMjqXtUYwtXNS6KeY+XYjokjFe2yC8yZVu7/kk++Yxn/iQXqGAo+LIAXbhAaTot07D9OhgD9rt5MPGMAvEZUGJyKDDmPV9kFTV6v+v9qvXT/bMztVYfqN+MVWAQyKh7svnPudba6Gdw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=Nyi2Id4/; arc=fail smtp.client-ip=40.107.105.86 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="Nyi2Id4/" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ch4dRdWYsB66gBfxvOrGROYBkMkzG5o0+o3DL+Fj5temY4DLK97IcBrrka+EozkEB9iGUkVs/PJM7w0mEAchPA3qKVmuqEFJKeklPS2gFxcphX0GMfAyQesKOMEv2WRVLG1JJ8+EJcXwm/3ClpIZt29FzyUinOZuEmj5gPChWpFJsrvNMVwWZc05TToOpxBVZ6eLEFTDnJgwkDcdJ6BJxeftkPEv3nM+abcfRomvDBt4oD4T0WfM1hOnmBqWWyVBry9sDIVnUOEmhwzdNTl0AgPYeEOUPmDHxFMW2y3qkcqk+mXa72wh/jmPvrOBWCv2vRh0MIe2mS27RBfUHLJuMQ== 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=A11+9ym35pWVX5NG0smygaEEccFXHZKV6g+90KFlNXM=; b=aSU7KOat1p3uEpF5qIxzhrMSm/WEA/56Bqo7eMIT6B+EmjVcCthTnTPQi9ZC1Y9U5RwXGSpNz43p33vX8XHTYv5fl6Lk8uT45JWf4TnzuGIrgtGfJwj/fsGIj2k2rYJCh0QoZ/Stht0DqeHmt2JVZ5qe156gu49Vextf+rxU5Q0yK2PTo9RjaX/tN5VfhGEqA1w1MLVTAE7QffKcSoufYpDHPsrWMz+RPOVZDSJ4yq0lpaRaEjV2ZXrXvZXGR7U8Ssxz7exQdqkOR/PdLEtVg4CF27hrjB6fnBPSk4S+6uSQ3Bqg6qiN7u/ddW8LqpRe/FM7rHx7dTaRNQVtL/8Wtw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A11+9ym35pWVX5NG0smygaEEccFXHZKV6g+90KFlNXM=; b=Nyi2Id4/jQelS08y9G9kBNSINCAShXO3yG0SfGWD7Q1hIbwnabW/k5h09/DM+4IwmiXa7GgMtbzf8/U2yD6gmP9FbGjrHQlYpcupy6tjfPOyhmuQWayZmsywLcxvIddj6zvsRFZZm/tErH36okU+ASbA3JEblYFz/bB+pmJGFLA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB7374.eurprd04.prod.outlook.com (2603:10a6:800:1ac::11) by AM0PR04MB7121.eurprd04.prod.outlook.com (2603:10a6:208:19a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Mon, 13 May 2024 11:53:55 +0000 Received: from VE1PR04MB7374.eurprd04.prod.outlook.com ([fe80::1a84:eeb0:7353:4b87]) by VE1PR04MB7374.eurprd04.prod.outlook.com ([fe80::1a84:eeb0:7353:4b87%3]) with mapi id 15.20.7544.052; Mon, 13 May 2024 11:53:55 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: Ioana Ciornei , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Subject: [PATCH net-next] net: pcs: lynx: no need to read LPA in lynx_pcs_get_state_2500basex() Date: Mon, 13 May 2024 14:53:45 +0300 Message-Id: <20240513115345.2452799-1-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: AM9P192CA0008.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:21d::13) To VE1PR04MB7374.eurprd04.prod.outlook.com (2603:10a6:800:1ac::11) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB7374:EE_|AM0PR04MB7121:EE_ X-MS-Office365-Filtering-Correlation-Id: 6eed0978-c90f-4aa8-e34c-08dc73435db3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|52116005|366007|1800799015|38350700005; X-Microsoft-Antispam-Message-Info: 2+H7h47lt7DpZ0qGe8NMF7E5qufloYj9BJWtkJJ7LOrK1w4Cdxuu56NfBBsx6mb4HLMkdhQfYnfd3O2LKpOw76hN7fDnXXaf1rFLw5H+zUtpG2OVHdTy8QO9qrlX+RK2mDKO7kYLoBPuMXqEJLsDOZJtUjLsGy7GCP0cEI7mawTFdD1dctvnmGkPGe/UeAojtHgh0AbvP1UieWJvqIrWC0gvEst0uZ9PtqgGGT2uox03NVOiIqk0gr1mjIHHIwk0uMZmvykdel3Oy1Ks8Kvy0Y2/SQ4VkJ0WF29s63I4tuQ92XsHQ6PuKfV7gkDb3z5oNLxN6+um4CpEmq5NDf1Q/juBRM2tKlYwYSiB3B4YGh3005cHcxVuTL9pw8sywGooHOLIXCfOgBYHadFayT8KcQlvmF5SHLTBt8zIIK/9dLxcu+XWYuHOu3KDFaBAuvja3cwrwumfmn3pAENDJvFXWaIYVdowpgtbXYZTs47/o0TN3L+mA2L6T6Jv3cds7wKbO9UjyUTfUslXvX6vBxW1sHQ0crKuIzoK5bmmOx8MqTEjA0yTey3giCJyg2tIUig//8XTAKlen7wpUpHK4R5OxL9rbA0X17ehqlBkwVghcgRzApUcx4iOhr+BllXVSmK18D+WZLdKEKJEryx0Ufo5iyDZmzvYFfe+s0gNVXrd8hlutjnATbF0gulnDZSGdoSw/uosrgoScXwgRr+QbF8G/Ui8mtmkOoWYuFDlHWuDuEoMGVW1as8a4PP4WkM5I13L4upyZD/X/l3OjQ5oMtcmLHdLCaaIXmY3rYAviOHz7iYruwCTC/2pMrfz+SAdLOfj3PcNrRDfeePuojXEwFsslh1yycB/+vfx6ahPGzn1BBqAhJh16yVNv+rqg0naUDqwd5HxVIXLvNdnvG6SoCUGFdw6ZO/+leGpjFbwHSJhj2gWXm8m+5bD+xq8O4+3hadJ7sQt0Xkdiv9an5cYY76PUVjfJzvqNud0n94pFbpDPPHAnGgNqdrf9QlVVL61lJ47/T+2Iqh8rygsnGa1S7Max6Kwe48VdrY1sQdj4wTLOgyLabld01wmDVLQq5QUZNu2pkg3rIF+qY2hFp2E2TdCfCZ2iul7ej36cQ5ovxC6Tzvkej5LUs7IZE2aNtvnjTHXI/GJbzPFaNvT1DIVQBUQuM889uL9DD0hvbIUQFTZ0p3QVD1yqKPIIa2g4PM01c5xvag7bDOLEVz/GqMUjTlVINPptquUweHFIx9r+k003PemjemitNoID9yfrY+FyOwh+yQElHTmel8977MuNfufrzr57TaJhI8mX0S0kcWiF7isk85fOOeLC5t9iuhGMxN79xUkKCZjOWagbx9tZjxNqw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB7374.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(52116005)(366007)(1800799015)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ki2tZeMgC9JxgQIcBmgAU9GczHLr1/+vsGxtCmdeYLgRQV2xWzC6uHNvnxJS/+2lC8CnoAjIBFClI69UfmT1wuqZdHTq8yGO8ANsFjuN3cLeG/XuxIlAvSzCVpJvXA+GweyJBWWG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P470cHtrk+ytESGrBCarAUob1+GuZuBb4e0TGcoj0gEW+Tix2Wm965KZnsjtupnDFpTN4rOrOEjw1gEysrbQ+1YluZPyU31x9hOLYL562Xm/N/zRmEgc/m6xtPbv17pNA/NML7nkvcVSJpRg8GbHxBPpiJ5IdIq7vb1pgzesTL/PjIz2r3G4435wNe/vs4vF9S01EHF3OioZt27/UsXGZZw8bQG0JETiz2vnvpB6ENrI4RAx7Fhl/plSbOhXUmxarECxWsi5a/xa82U0/0I9p4qGyeUa0q7EXElRTLiyotXQFz1IMZ303dXCLnpqeKhO2vyQrPHz8JrFcNwywrgCdz+xs64/BnnA/mS7zyQd2Dutr3WvoqbZcfO/g0852I6RUIyAFXpAcsgVG5aOUp/YgXsLp83nC4AA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6eed0978-c90f-4aa8-e34c-08dc73435db3 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB7374.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 May 2024 11:53:55.3950 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: S8YspL/AhSQtEqRvd9tQYVzZHhC2GGx4pY7H+h9/DsHQwrhqCgKBKbGVV9Pr6+e6ua2hJvRCtoyeSQPJuGMuCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB7121 X-Patchwork-Delegate: kuba@kernel.org Nothing useful is done with the LPA variable in lynx_pcs_get_state_2500basex(), we can just remove the read. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn --- drivers/net/pcs/pcs-lynx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/pcs/pcs-lynx.c b/drivers/net/pcs/pcs-lynx.c index 853b8c138718..b79aedad855b 100644 --- a/drivers/net/pcs/pcs-lynx.c +++ b/drivers/net/pcs/pcs-lynx.c @@ -61,11 +61,10 @@ static void lynx_pcs_get_state_usxgmii(struct mdio_device *pcs, static void lynx_pcs_get_state_2500basex(struct mdio_device *pcs, struct phylink_link_state *state) { - int bmsr, lpa; + int bmsr; bmsr = mdiodev_read(pcs, MII_BMSR); - lpa = mdiodev_read(pcs, MII_LPA); - if (bmsr < 0 || lpa < 0) { + if (bmsr < 0) { state->link = false; return; }