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 B925B45D0B; Fri, 15 Nov 2024 07:08:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1232242F7F; Fri, 15 Nov 2024 07:07:57 +0100 (CET) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id 8BE5742E52 for ; Fri, 15 Nov 2024 07:07:53 +0100 (CET) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-72410cc7be9so1339117b3a.0 for ; Thu, 14 Nov 2024 22:07:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731650873; x=1732255673; 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=kVfRmajsKsbzmNVMLv1163Tsnq+I8WPaI9339vO17sQlLvu9tuRahedPhrik3e0YDd NsA071a6oY3bfTr3BGomLmmuP0/a+vDrg74G7gYAbNfX0qwyv6PZvtNwOarlE69C6f7c Bj5rrOrhp7a/yDifYKA7vThVbzeuyR4olfOUfr7RjLD7wrGTzFTt0pQt8kfBitcv58pv iTHzNlQH2IkMF8ZEpRNEC6mXdGcHT40jWgp3mPlhWht04XTO7On4/qRYiPuge0WsdUYr I1idqPU0kIduMCaXBLWQsB5ckzRKF0KTtExLFOagJxFUe/g5oFHY9D9vkGW3boqnK5Nb fj7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731650873; x=1732255673; 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=RBLKi5jQRvAqhlxaqTBHftzvVNKMWSWh+ajVkEYgsZ4uTIVZPK6E+Gky2V9AYJgKJP lyhje8h+szG3vAQKt9GlVPLNMiXd6K1sv5jgIw+DCECIBmkBsQ1b83UOWJWi2nWFZ3H0 hsZaZgS2eHI59KSGerj9jXK6aaAFyXzrrWxYDg38wQD0MGuYFBRd997qJj5oIwyNcTb9 LIVZUlXhaeO6JN3aNg14uyOszfSP2q3kl1F1P1huNJQlz8uYWhHOvv5lYfd10LDDqb6e fROUBl4/f9X/q7lXSol4OJ7wxg3HInbB/ICYrmdag3YmQrjHnAkdCR7mp83jkeiVX2Ds KRuQ== X-Gm-Message-State: AOJu0YzVT39whaNDjOR5QVCAcLDHcHgAYzKo4NEuEcN9qp+oa+4iL41P tMTB9VyphQQRF8AW3mufHFWOACHeBlC3QmI0kjLOV+4pU26m9iUILNldEn39fNR4mf665O40lqh 4 X-Google-Smtp-Source: AGHT+IEjBqgsrEQXXDeOOh3udBY9rq4zrI2emT1CgjgAVBy7kbKWXyt18J9i3YAceC/nVuaTPpzhQg== X-Received: by 2002:a17:90b:4c52:b0:2e9:4717:97a8 with SMTP id 98e67ed59e1d1-2ea1559feb9mr1687757a91.36.1731650872598; Thu, 14 Nov 2024 22:07:52 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ea06f4856esm2123781a91.23.2024.11.14.22.07.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2024 22:07:52 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Christian Koue Muf , Serhii Iliushyk Subject: [PATCH 04/16] net/ntnic: remove dead code Date: Thu, 14 Nov 2024 22:05:41 -0800 Message-ID: <20241115060738.313190-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241115060738.313190-1-stephen@networkplumber.org> References: <20241115060738.313190-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