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 CD84043673; Thu, 7 Dec 2023 19:57:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 031D042F3F; Thu, 7 Dec 2023 19:57:33 +0100 (CET) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by mails.dpdk.org (Postfix) with ESMTP id 388FE42ECC for ; Thu, 7 Dec 2023 19:57:31 +0100 (CET) Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-5c21e185df5so1052573a12.1 for ; Thu, 07 Dec 2023 10:57:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1701975450; x=1702580250; 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=qpUZ79Xj70EffcLOtTAWaVlmbXE52uAoNhBVTRRvx5w=; b=c3fbSKiKP36+wHYeBlZwUXHV+mh8Shp4Ko2BhPr9X7vfxbuir8Er+w3Mj4s1M7HPcz H0O68zANVkbHE8VYpmiakYUsbdlZT8LxuWCgSmzYF+QSs7+r07IGpY8CdNPE6MHZEgAJ GyVsxtQXkpbIz4EumE1rDRlDXbUvwc34mVh3jRWnsW3KoSwch53vgxfD+n1QEiD9fVFE +xYiDPD8tr6HBrWALb/Tc142SoJ5Ccyy04xgbdktGj8m7U58I7LL/GnL/lRy/ncJ7ULU f7pRWgy0bBgdzQRdsERa3XFpRngM4kmBgoFHbC8j6PbNWHSrAgykjkCu1zvLkr7u3oOo lAIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701975450; x=1702580250; 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=qpUZ79Xj70EffcLOtTAWaVlmbXE52uAoNhBVTRRvx5w=; b=boXi6r0+3UXY/TGSBrPr2d2vfm7Mci8Mq7kSMtvF7i5MGA2h3dfaD87chdvTHLCeaU HJMOIieY6+nVzTUQ1/ib2f61V/pg+NQHOw2CfASsTdxllE0iOlQ/3QgfEZYI0+XdYsk0 wFQdbCAcFKcrFEgR5nmT+B0tr1R0YQKZzKssQMYvlV0m94MYc1lYLmTo6oynEtHG6L/H OPrBGEBmDFKxlqRTtoCStpVvSBkOjROwEQWfInAS0PLcc9vFw2kDxaJsjOyfLg2PmUmo uwb0fLFE7yo9HXikZjQh9OOL5KbKYIoCtUi1ncgLTUOil2mgpO8qH9sc1GemNqbhHvmy pdqg== X-Gm-Message-State: AOJu0Yx7P6bhzBJXUuKllpIlKn4j97GqjuUESu8i5ZOWTCIzhn0miVug YL9Nfmc7IavdZi5MqaGfRAM1ABnY3jyQS0IDMbSaFw== X-Google-Smtp-Source: AGHT+IHESXk+VNeZ0A4V5dk9Fa4yxfeUBQVchlu8qaiyNdIx3IGENgpk/N0SHLBkobJwEB2VTfsnpw== X-Received: by 2002:a05:6a20:9414:b0:187:9521:92a7 with SMTP id hl20-20020a056a20941400b00187952192a7mr2578793pzb.18.1701975450457; Thu, 07 Dec 2023 10:57:30 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id 64-20020a630043000000b005c65d432119sm105124pga.67.2023.12.07.10.57.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 10:57:30 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Martin Spinler Subject: [PATCH 1/3] net/nfb: remove unused device args Date: Thu, 7 Dec 2023 10:56:29 -0800 Message-ID: <20231207185720.19913-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231207185720.19913-1-stephen@networkplumber.org> References: <20231206175326.116375-1-stephen@networkplumber.org> <20231207185720.19913-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 driver has no entries in VALID_KEYS array so there are no device args. And after parsing it just frees the result. Looks like it was copy/pasted from some other driver. Signed-off-by: Stephen Hemminger --- drivers/net/nfb/nfb.h | 2 -- drivers/net/nfb/nfb_ethdev.c | 16 ---------------- 2 files changed, 18 deletions(-) diff --git a/drivers/net/nfb/nfb.h b/drivers/net/nfb/nfb.h index 7dc5bd29e44c..21cd8f78f641 100644 --- a/drivers/net/nfb/nfb.h +++ b/drivers/net/nfb/nfb.h @@ -36,8 +36,6 @@ #define RTE_NFB_DRIVER_NAME net_nfb -/* Device arguments */ -static const char * const VALID_KEYS[] = {NULL}; struct pmd_internals { uint16_t max_rxmac; diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c index defd118bd0ee..4c4e2e3273e6 100644 --- a/drivers/net/nfb/nfb_ethdev.c +++ b/drivers/net/nfb/nfb_ethdev.c @@ -518,7 +518,6 @@ nfb_eth_dev_init(struct rte_eth_dev *dev) struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev); struct rte_pci_addr *pci_addr = &pci_dev->addr; struct rte_ether_addr eth_addr_init; - struct rte_kvargs *kvlist; RTE_LOG(INFO, PMD, "Initializing NFB device (" PCI_PRI_FMT ")\n", pci_addr->domain, pci_addr->bus, pci_addr->devid, @@ -529,21 +528,6 @@ nfb_eth_dev_init(struct rte_eth_dev *dev) pci_addr->domain, pci_addr->bus, pci_addr->devid, pci_addr->function); - /* Check validity of device args */ - if (dev->device->devargs != NULL && - dev->device->devargs->args != NULL && - strlen(dev->device->devargs->args) > 0) { - kvlist = rte_kvargs_parse(dev->device->devargs->args, - VALID_KEYS); - if (kvlist == NULL) { - RTE_LOG(ERR, PMD, "Failed to parse device arguments %s", - dev->device->devargs->args); - rte_kvargs_free(kvlist); - return -EINVAL; - } - rte_kvargs_free(kvlist); - } - /* * Get number of available DMA RX and TX queues, which is maximum * number of queues that can be created and store it in private device -- 2.42.0