From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 915E643220; Sat, 28 Oct 2023 08:16:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 55E42402EF; Sat, 28 Oct 2023 08:16:36 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2098.outbound.protection.outlook.com [40.107.220.98]) by mails.dpdk.org (Postfix) with ESMTP id 90EC240272 for ; Sat, 28 Oct 2023 08:16:31 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A5Vqr61AYLTIzIWKqlQbU7Yechs0WvNfT3ULQeAVYEEQUTBZIwDTKDDbFICs5i1VHGsVEdIdwnpzcHD+LZygLWP2YUk+n6iKZIVUHjTCFf4p2RpHQ4ZhiQRUnFvAlVwZGzmaDfbv4MKeVRdnF1IKM119FPrBUGvZKuFHlyr1G7ZxJMzly1eMtKSdHu4ESGrj8geWOo/F2vv5L0CuvkNKhSW+rxTqhEfVcA+BPY26EH90kOP0j837SKyKy0ojyOFyvg52HubrQRhg0V948jOv0eMF/0EPkPFAiTq0/PtKxRNDjEvr8kj6VPow3GRgVU80ZniKVIZ4u3Wfg0FuupLzMg== 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=jJ2KealchQyOffBQAnd0TdJ4UTOH0Q/rzFfFuUO5yDE=; b=GuFYlI39fjkodA7WpPz2ZZR4gLW/sQr08RIAXtRchtwZJPKNajtkbcsubzRRgGTGUOnboSA/ZkQ/dkGf2KlVXTiYujk0/K6tZUkBMEXd1lcA9bVDT5Ee4D1/g3jb+adfqv9nnUByDL1qvcaK+UvxDPJbtNWJdMnr6tBBpB3/FZ+shLS2F6PXvz7vJbS3pw++U/wwIqLnkmBJ0kSmdXZ79PvZ1coHEx8OlsKRBcOQm1c5zIR+FE6Lh1+2WqiEgTLG/A8jAqIHGTaHBxVLmTIK+7BPa7dK4kk39noWoI8X7DlxNoW//d0HHAYcgZuOXNzCW76JU7ktUb4K6I4vGLur9g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jJ2KealchQyOffBQAnd0TdJ4UTOH0Q/rzFfFuUO5yDE=; b=nGBwShMbby2Xy8niNbCncv9iMpgNqlrBL6cE2q2D8XVTdVusH8eS0iMBvUap2eyfVf8REe/UfXjdohCVxCtCOyBUXcocpF6UgP9I9HjHsySb3Vb063WLsFYsxtDytczZ11KNLYWWkOJFe684+cfRZC1OL/juxGIMtHLdLkL13vA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by PH7PR13MB5551.namprd13.prod.outlook.com (2603:10b6:510:139::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.29; Sat, 28 Oct 2023 06:16:29 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b%6]) with mapi id 15.20.6933.022; Sat, 28 Oct 2023 06:16:29 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Peng Zhang Subject: [PATCH 02/11] net/nfp: remove the unneeded call of underlying API Date: Sat, 28 Oct 2023 14:15:49 +0800 Message-Id: <20231028061558.1842855-3-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231028061558.1842855-1-chaoyong.he@corigine.com> References: <20231028061558.1842855-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR03CA0246.namprd03.prod.outlook.com (2603:10b6:a03:3a0::11) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH7PR13MB5551:EE_ X-MS-Office365-Filtering-Correlation-Id: 70ce24c1-adc2-4518-32a8-08dbd77d6c94 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /aP1OznToIo2m3WcPnC80eFUVls0N78U3+WdfJIvLKlDiA2MVHMx9tpZIE9COM9ymq6n3WpxX3aOeqYRV2mrl+qf2FIslk/DspXkE88mQGUFp2Z8oRWVmkVlQcmub+mR3fhAO/TfShQaen5s4HLbbS/bKwCPyDP8Gjs1/0QB3IHXsp2EmC0c90QOKrvz1Z6Rc6r4moJXQtkgpkY91+f2TcQepfaoBdpCDwDDB3ypynZpN+vNK/2AzUvNk9P83gQDt18SdZ8T5QSEYvIjk1QtPTRa8GkZsq4BSdmaK0OWms+fJn6IL/3fpp9L7NKuVfTSLvj6QEEIQU4Tdv7SOsaN8F7evu7XgoMsf43jALrJPlyj86BCFz1lMOK1+cezbnfpxiJ8Hr4pq35mlRN/bC5wFPlzWmQtRiG9gASpeciJgMeLLVdL2Rmv94GkODa8nyHlr+FpiDR/B0c7GLhzHV1RHi0fIUTqjJhjt9jqmfmXGybj1FjeUWte0jdFkzlvQfWHemSmN6hsmadLaOlEpDhIcujuXu3j1dyvb5tfmEXkigLSxUve+KdU5FegJClz5ANvgnuzYGE8AnZzt5yJHMlQfsQVMcJw0/iujvI+anAJdbQ6k2NdrrGEgLriIgmXl8PR7lh9OH7ryTn1H/fpaZ6TnoamYLbjUXBCAWEhtS2hLQ0= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(39830400003)(346002)(136003)(366004)(396003)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(6512007)(54906003)(107886003)(6506007)(26005)(6666004)(52116002)(83380400001)(2906002)(44832011)(5660300002)(4326008)(8676002)(2616005)(6486002)(41300700001)(478600001)(8936002)(66476007)(38100700002)(6916009)(316002)(66946007)(86362001)(66556008)(36756003)(1076003)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?9h9AWGE/qV02+QsUhxOJTZUviKLd/MTY3PGZQqtK2c80SLqlE06gnTHa0fbI?= =?us-ascii?Q?iaEbFrFDFmGFU/NC4bOT+q3MWNhGOISGNVDHNI1ihwzINaNuPGXfNYN5W/Mf?= =?us-ascii?Q?Mo08P/V4wR/CF0I7M52567N9pkbI1tonJDJt3z/FXvH8yqU+pIIcoPOi+cTs?= =?us-ascii?Q?4tkpTq1N7yEHIK6jxqFKJCZhu+dhewfjaa5SvR6nX24n05d9wA+85pjXUd+E?= =?us-ascii?Q?VAKGCjoZ/4j0gBM9bqB6prTdP1ZwjLBnoCZHCFlyYbALlgXvSrZNRcWb6WoX?= =?us-ascii?Q?BoVtdudVXTbuvmF3KeTevQcjDirD65nAHX0W3xxFmO0I0c6fSEIK5h0s9j8n?= =?us-ascii?Q?qPDrysqJaPfLxlqcyyXMFg9a/SyizZNd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wyXfqP4Zuf04wRzyHvYYw1zIjTCMkIEcc5yMsZxnAc8ABJGc3aQUM?= =?us-ascii?Q?xOzyLcClY7t5aCIZS5/RRfUPhb6vx4NB6HGb5K1mvznsljXLx0tyugY4POkC?= =?us-ascii?Q?loKj/BQ85VLs6pLIOSeW1LlatE0TBZ46NUWkuyxlkT0ehQFS1m4JBlbepam1?= =?us-ascii?Q?i6BnXoAo8VFA8tdMzJa6qVll1iQ+6QxrcsR5tdVzbeReeea/nEOs2YmpQepE?= =?us-ascii?Q?j3brhTAqsax7LAVhmblSTe6/S61OL9HY76oI4H1SfvsGL756GEJkFcQC9xKc?= =?us-ascii?Q?l41TwvfUc/1XuHplKJIhtBsKvvw3tJwNbGELVv+AnbdVqDWSDZwqP103yo+O?= =?us-ascii?Q?Kg=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 70ce24c1-adc2-4518-32a8-08dbd77d6c94 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2023 06:16:29.8479 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Nw4FC+l/Dp3UNNqO6Qf+Jeb1uJ0eum7uw3RrTsix8u8AjNE8FEWJMgukS+Ngl7cbd7xsqDLicNBrwOl174GazxT4bVqCz6jeHWsheOciqxU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR13MB5551 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Remove the unneeded call of underlying API in function 'nfp_net_pf_read_mac()`, because we already store the result of it in data structure. Also change the return type of this function to 'void' as there is no abnormal exit logic. Signed-off-by: Chaoyong He Reviewed-by: Peng Zhang --- drivers/net/nfp/nfp_ethdev.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index 76317925ec..0fed0ef72d 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -21,7 +21,7 @@ #include "nfp_ipsec.h" #include "nfp_logs.h" -static int +static void nfp_net_pf_read_mac(struct nfp_app_fw_nic *app_fw_nic, uint16_t port) { @@ -31,13 +31,9 @@ nfp_net_pf_read_mac(struct nfp_app_fw_nic *app_fw_nic, /* Grab a pointer to the correct physical port */ hw = app_fw_nic->ports[port]; - nfp_eth_table = nfp_eth_read_ports(app_fw_nic->pf_dev->cpp); + nfp_eth_table = app_fw_nic->pf_dev->nfp_eth_table; rte_ether_addr_copy(&nfp_eth_table->ports[port].mac_addr, &hw->super.mac_addr); - - free(nfp_eth_table); - - return 0; } static int -- 2.39.1