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 F25E245CD8; Mon, 18 Nov 2024 19:22:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7CB9C427BF; Mon, 18 Nov 2024 19:22:10 +0100 (CET) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mails.dpdk.org (Postfix) with ESMTP id D13664279D for ; Mon, 18 Nov 2024 19:22:06 +0100 (CET) Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-7e9e38dd5f1so15487a12.0 for ; Mon, 18 Nov 2024 10:22:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731954126; x=1732558926; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zXNXSHp0oztajl3KUu1RUGdkuzBCpAvnj5ePw/9sULk=; b=G/YTjZ81ob+VUUl87FCSmBQv9nM2iaB99a9vVyrcpr1gfYnyigRlIkYjxmaS3Sonjn eDMQA7dZk/HOm/UXH5bzCPlWQ43kjM1OJ2/DsfA3tJeBoFFPR2Aj2UXn4mF6/XAD3Dgk XgrVrm/oEwxES+DrCpm7fFnnwQuPV4fYCfORtJihQO12kOTTssy3Fc4ZUZ32Yv9SKTyR HnDp18s2bZCQPYkhFXSUeKlRbIvRmeIzI5n/Dp7Pf99Te3rcxaxXg/5S4atJa8SVcnqE 0llZUPXFouycOwh5scx4MSR8cHekD5CytzxGOpwbbk9waeAKLpKkFuqygjjBqvzBjMQc caWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731954126; x=1732558926; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zXNXSHp0oztajl3KUu1RUGdkuzBCpAvnj5ePw/9sULk=; b=lXnOQgU/tu12UvJ1K9HAVQEfacqlzQqj1znQjvOk5UlA/DSiRYEoS/nogY+VH+4ClM fFlBYWuNwO5ApQNLMwFUNUy6JYKqLKYqgyROZ3/rkcebbxw9hPmlSOrRZlROUNINh0Yc i/s7IretMoNFuGEOkAmOFkfQQ1veC8/evH5OvZgWHxY1ss5Kkyrlh/Lre3MxzKaUaS4a cpD5NdGBSS+J5qfO7O/8kb+iPI+uPr3GtsLA9ISlv3R+daEdJiFukX9CudbJudtdGnrY 8oKqLF/QbmDbTnpEqB9JuHUi6Lwm1X9eAhoLd54xjyNwqVbj7vInYp9Cld2zgGEurXix 5Lww== X-Gm-Message-State: AOJu0Yx7DKGkp6TScyzuRXkHKcnpZK9Fk0qnYdxnKf3/oeP9a1IUV2Dq vqYTkCX12DPfc67CKHvIZ80LRa6TnfJlfRix7KA2yHd8sWwrNstdlTkPnf+CXGayvdcz7ExBMzP J X-Google-Smtp-Source: AGHT+IFHGj/PbmXaER4RbtzUq6Wn+rxUOkQjtlamY5heTO+cekkEQfNC3HRu9avQBgids70NuJx51g== X-Received: by 2002:a17:90b:53c8:b0:2e2:c69b:669 with SMTP id 98e67ed59e1d1-2ea155a2354mr14843844a91.27.1731954126026; Mon, 18 Nov 2024 10:22:06 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ea61869bb2sm2916724a91.12.2024.11.18.10.22.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2024 10:22:05 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v2 04/19] net/ntnic: remove dead code Date: Mon, 18 Nov 2024 10:20:45 -0800 Message-ID: <20241118182153.87042-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241118182153.87042-1-stephen@networkplumber.org> References: <20241115060738.313190-1-stephen@networkplumber.org> <20241118182153.87042-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The loop to update speed would not work because num_port_speeds was always zero so it did nothing. And the array of pls_mbps was only used inside the loop but never set. Link: https://pvs-studio.com/en/blog/posts/cpp/1183/ Signed-off-by: Stephen Hemminger --- drivers/net/ntnic/ntnic_ethdev.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c index 2a2643a106..467fea4bf2 100644 --- a/drivers/net/ntnic/ntnic_ethdev.c +++ b/drivers/net/ntnic/ntnic_ethdev.c @@ -2037,8 +2037,6 @@ nthw_pci_dev_init(struct rte_pci_device *pci_dev) uint32_t exception_path = 0; struct flow_queue_id_s queue_ids[MAX_QUEUES]; int n_phy_ports; - struct port_link_speed pls_mbps[NUM_ADAPTER_PORTS_MAX] = { 0 }; - int num_port_speeds = 0; enum flow_eth_dev_profile profile = FLOW_ETH_DEV_PROFILE_INLINE; NT_LOG_DBGX(DBG, NTNIC, "Dev %s PF #%i Init : %02x:%02x:%i", pci_dev->name, @@ -2178,12 +2176,6 @@ nthw_pci_dev_init(struct rte_pci_device *pci_dev) p_nt_drv->b_shutdown = false; p_nt_drv->adapter_info.pb_shutdown = &p_nt_drv->b_shutdown; - for (int i = 0; i < num_port_speeds; ++i) { - struct adapter_info_s *p_adapter_info = &p_nt_drv->adapter_info; - nt_link_speed_t link_speed = convert_link_speed(pls_mbps[i].link_speed); - port_ops->set_link_speed(p_adapter_info, i, link_speed); - } - /* store context */ store_pdrv(p_drv); -- 2.45.2