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 7AEAA43220; Sat, 28 Oct 2023 08:53:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2B35D4069D; Sat, 28 Oct 2023 08:53:50 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2128.outbound.protection.outlook.com [40.107.101.128]) by mails.dpdk.org (Postfix) with ESMTP id A43A94064C for ; Sat, 28 Oct 2023 08:53:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NcknuzFdv1gbq/62cfY/nFUilReabj0159JP79p5mf32FB9d7k4nuUHqejlqE5U8b41tRwqxx2T1fKOGTwnaN8KYWS31y3FP0sc0lESZ2kaJqhqGBwBhiLWoQgwivGDIxtxzxreAtgIBotS3yGmQu8k0WwnlyKHAkE4/ln+S4hckVYL8m2V/rFiBS6VzaULdWDiXHK3nBLnISVEl+sEkLfzdIRpnNgr3llaztf4v6DzCp6GrTq7Vqlu+5MIrNIJ2ASH2Vrn/Ncxl94YZuq6OONbboq7DHQHcLku0ZTPBfFMZ4bg0YioVDGui5ZYWZTRpLIYHS+pVAH0UGzejawsxAA== 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=l7qp1i3OlCi1z4pujF0YItnpQmpwtue49E4hQDue/wnAibEwVyNB5aGkvRhxqOVwhRI+QPdLbGzMHt0f03mfXHyhALm1u5KPrx3PgL35WD1dt1e+9m4THNFZ2z1vt0JslDvjgY9aj9J1W//k6Nj59P0+vmYAVE3kvni6KQJjlis1XVot0tCve/7gnWVvW8HbwOYgBicPL13GCC6HVAUvyzPExMUxcx8Q2Ac8Y5/QLQyfbYlLSpr1zNm2AnJMklJ1wQjZnbIYAJ05eOj0d9j7hhwth/BH0IFSE1ISxma91h3pNcT1yu88jFupABWu+NKZ3zE85GCrVoiHuFsxWY4O4g== 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=NWu7Uk99ODIvXMWuoGfFu7X16XwJvB2coylkBE/EKtQz4fyYrfKo8eWB3mcfUjY5xmz0ls27BUGi5weSUl4t9xsY//CLgVrDollH2HoX6HmUmrgBmdOAjRTE2t/TNlb+u5E0i/SrtkJKppujbZX1y7WabpoWLrAnXDJ/U/yoeA0= 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 SA1PR13MB6055.namprd13.prod.outlook.com (2603:10b6:806:338::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.19; Sat, 28 Oct 2023 06:53:45 +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:53:45 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Peng Zhang Subject: [PATCH v2 02/11] net/nfp: remove the unneeded call of underlying API Date: Sat, 28 Oct 2023 14:53:06 +0800 Message-Id: <20231028065315.1937188-3-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231028065315.1937188-1-chaoyong.he@corigine.com> References: <20231028061558.1842855-1-chaoyong.he@corigine.com> <20231028065315.1937188-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SA0PR11CA0020.namprd11.prod.outlook.com (2603:10b6:806:d3::25) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SA1PR13MB6055:EE_ X-MS-Office365-Filtering-Correlation-Id: 39e9e6c5-cf4e-4ee8-29a4-08dbd782a12f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OOj0kXXMw2i0kXdl2gtEEMGSz9U8WKeOwq/0eNA8IM+GHt7wMK/Ij+ToLle40gXgrrGdTJqndD3tYf8aZB0oZ2fYVJVUGgPlTq4KmtlvlwR/NiNCjTWk6j7ZaDimeIZ+9RzqhW3fuXPv5J3TIrJUUZMC7Roldk4I2uWP/CuyUWUVwtWN2HwkXTGHkJhsqBPcTQmVP72XYZDzkvqsvcJzAuuKTvRdUmlqDenA02Po3bePs6babkCyf6p9ojfe2oGNYznJnhIDbexbLIxk3qpe/DEXogX4wFDdRmUeWRCaEsPoVA28cuOBEJ0OfUMfIKkrd/rCHt7fEhcNkfsxhKxRaxi5nkj9g/HeZUm6ROcclvMkVVsSF+rZ3ulfNWZpSYGq/YVrECTyUPcxWkJFHn2JndCC7quiHOp+XcIyILJfhCE9n7LCQ1lPfmwtxJwqPezfyfHM8wCkGZIzqerTXuyLBCey3hWDVck5u391uCj49z9IZx0DpO6/6zaYeRGy9bjcuCUSLqY7Y0TZ1+TpHvFwDifwNeA5JviMzUKpo4AkSyWlV3Y2ZtWz7ibRgTfSV8hBx/ExED9ek6UkQbaZG3BmoL5E6pmyQ5l0oQ4TdqgbwS1Ex53TGZNnVmSxhPSnXwEDVOzPigu/0dsKlGxCwM6M3b136nSLLGJzsUqgpmsdGzY= 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)(346002)(136003)(396003)(366004)(39830400003)(376002)(230922051799003)(451199024)(1800799009)(64100799003)(186009)(6486002)(8676002)(8936002)(478600001)(6666004)(54906003)(66476007)(66946007)(66556008)(86362001)(4326008)(41300700001)(5660300002)(6916009)(2906002)(44832011)(316002)(6506007)(52116002)(38100700002)(36756003)(2616005)(1076003)(107886003)(6512007)(26005)(38350700005)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?W0bnA9oNrYk7ZF1jk0QXWkPPa4Fw7nt+rZAY9srMtfP1b1+wGv1K96AZAXcn?= =?us-ascii?Q?XU6eJSynhwlm+Jm0m9gifUZLgW3r9NYJg+y6NDtiu9JS66ArgSorY+6ozbIa?= =?us-ascii?Q?13rgd4Av5TCwPVO2/crIn/v6flmW9qL3tLNXC9aQGvPzVyrybQra1Tg0D6gM?= =?us-ascii?Q?xyWzszVkqaCF/Tl5C27CamI2qjSSg/Bm/yIMiVJGPVwQzTKgc0JyZnFeVxry?= =?us-ascii?Q?z6YQ/gFcenAFCDs3WYs7JJCTbylQIkibpn/Vcc2Q09ZpgyXO/ynO/gFWu5JC?= =?us-ascii?Q?jxTbiw/Ikm3U+UUzf2Vi5T2rtktjhOHURTvowVADOnaOWC77wtULDL0bIdfn?= =?us-ascii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gIf5o0Q8AHxd5XVcniTEBlGA?= =?us-ascii?Q?+U0FgNJ2HxBhiN5Kj3uJWs3HtC7yxBqL/g0tSzsuolqxBbwQzmIPa0C70nxg?= =?us-ascii?Q?QysYJBsL62brb4XJ6fpGTI7oQg9Ew5cOfZhGYgXYqNRWMmuLsHPlvoJQsZGU?= =?us-ascii?Q?87qf6KyCcokDz11h4JwEDx/bRuhQWIeCY3bbOpPtvLZm+z4RlWdb+/FiV39e?= =?us-ascii?Q?cKr+j2balABngy3P64+ZSSL7T+eSjFlHEdD7LjcKQuhzsvd7DS6aw47jdJST?= =?us-ascii?Q?yMMC6a2Lw6Xwrgz9IJDDflSQlLroMn8BaousFktjRpSC9gHl3Z2LaFsRxX2q?= =?us-ascii?Q?zurMK7d1ZbD6kKDfjZekcJXlyp0hP4BhV4CGELYWdseek7o4U4uzvm8LqueF?= =?us-ascii?Q?Ig=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 39e9e6c5-cf4e-4ee8-29a4-08dbd782a12f 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:53:45.8608 (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: ttBFDIHdoF6gAhvutxun6iEPE2N1tB7Ap+dE5q3bG6g7Hkg9vByTQiTs5Cwp7q49ffTa6crtE/kO+7AltsHzcdt4TURvuST7ARlOhPlNDoA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR13MB6055 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