From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f174.google.com (mail-wr0-f174.google.com [209.85.128.174]) by dpdk.org (Postfix) with ESMTP id 9E18D7CB4 for ; Tue, 11 Jul 2017 01:19:33 +0200 (CEST) Received: by mail-wr0-f174.google.com with SMTP id k67so158629473wrc.2 for ; Mon, 10 Jul 2017 16:19:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=uqVSmZe/5t6xGWQEPfLU/9xeEi5Pb/dalWe6fzsztnQ=; b=bWQkBxRvzE4Cszpz/srveJ8eJAsnRBXXZroI/+2N/5bkJQc5wmqu0RM1HABhh72I6h E5DOAE5G9MUUsu3oeu44v+uqv1nHhc1yJfCNXxOavk/Cy9FEshs+eLOqwY/2pi44Qwjk Upcms8AjXXQ3UHyiOlTEpVESV7zipOPMLa8La+IzJGKTF1ub5eqMhUPZMEXBIEg9HfEd mNVabDMgSNABMr1g2u9RQakZBuWHpITyPHC+ez8uSY8Y9aLvxR8qsbFeI3PxJwcSrTD4 cmCyFOjaIK/s/1xi+BsnxJBGf5NigjNbAKABoXtnZ8yUv5wVr3k7uu74z+cGhbFifx61 rxZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=uqVSmZe/5t6xGWQEPfLU/9xeEi5Pb/dalWe6fzsztnQ=; b=mr/+SV3aFHNvantfGHaC6VgWKuLCWC/YkE/GAZMFJE7ewUtKlMPlgM3Cr2mqwfceql 0arb3gQxLI7ualoDx+eivhtCamvrA3n3ctfAUqkx3nCo9OqOCiOHRou6Xa6oevx+aHFb qGbTBDs7ynmA9QN9om54Eh8EeW6B8iMLAfg9TPGz5oEMAgdWNBSuo/VBv0zyGw1cI56O Ii2l/fjEW3D60s94Mb2O2HXXoSl52xiH3mIlTkPe8v0OigrRNWOXgAFW6nj06vsP5e8j PItKQNm6jvXacS8yobLATVUojbXjLoeRMw7SniBsCWTnghx1htQFge7iAbLjl3jPEjYs YbGg== X-Gm-Message-State: AIVw113x9FOSO3R5FuBfUmmv4keqRgm979wUS+G/YawsaUOSVY5hDv0T iu9EwkHbU9/w86JvSVM= X-Received: by 10.223.176.253 with SMTP id j58mr9310375wra.65.1499728773079; Mon, 10 Jul 2017 16:19:33 -0700 (PDT) Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id j190sm43773wmd.22.2017.07.10.16.19.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Jul 2017 16:19:32 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Tue, 11 Jul 2017 01:19:07 +0200 Message-Id: <91f9cf171611a76d522dc8798a1c385c0e30cc1f.1499728330.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 8/8] bus: remove useless plug parameter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jul 2017 23:19:34 -0000 The prior scan should link the relevant rte_devargs to the newly allocated rte_device. As such, it is useless to pass device arguments to the plug callback. Those arguments are available within the devargs field of the rte_device structure. Fixes: 7c8810f43f6e ("bus: introduce device plug/unplug") Fixes: 00e62aae69c0 ("bus/pci: implement plug/unplug operations") Fixes: a3ee360f4440 ("eal: add hotplug add/remove device") Signed-off-by: Gaetan Rivet --- lib/librte_eal/common/eal_common_dev.c | 2 +- lib/librte_eal/common/eal_common_pci.c | 2 +- lib/librte_eal/common/eal_common_vdev.c | 2 +- lib/librte_eal/common/include/rte_bus.h | 6 +----- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c index f5566a6..6fcbea4 100644 --- a/lib/librte_eal/common/eal_common_dev.c +++ b/lib/librte_eal/common/eal_common_dev.c @@ -188,7 +188,7 @@ int rte_eal_hotplug_add(const char *busname, const char *devname, goto err_devarg; } - ret = bus->plug(dev, devargs); + ret = bus->plug(dev); if (ret) { RTE_LOG(ERR, EAL, "Driver cannot attach the device (%s)\n", dev->name); diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index 7e82a31..a64d76c 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -533,7 +533,7 @@ pci_find_device(const struct rte_device *start, rte_dev_cmp_t cmp, } static int -pci_plug(struct rte_device *dev, const char *devargs __rte_unused) +pci_plug(struct rte_device *dev) { return pci_probe_all_drivers(RTE_DEV_TO_PCI(dev)); } diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c index 79bb795..0817573 100644 --- a/lib/librte_eal/common/eal_common_vdev.c +++ b/lib/librte_eal/common/eal_common_vdev.c @@ -316,7 +316,7 @@ vdev_find_device(const struct rte_device *start, rte_dev_cmp_t cmp, } static int -vdev_plug(struct rte_device *dev, const char *args __rte_unused) +vdev_plug(struct rte_device *dev) { return vdev_probe_all_drivers(RTE_DEV_TO_VDEV(dev)); } diff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h index af9f0e1..c79368d 100644 --- a/lib/librte_eal/common/include/rte_bus.h +++ b/lib/librte_eal/common/include/rte_bus.h @@ -113,15 +113,11 @@ typedef struct rte_device * * @param dev * Device pointer that was returned by a previous call to find_device. * - * @param devargs - * Device declaration. - * * @return * 0 on success. * !0 on error. */ -typedef int (*rte_bus_plug_t)(struct rte_device *dev, - const char *devargs); +typedef int (*rte_bus_plug_t)(struct rte_device *dev); /** * Implementation specific remove function which is responsible for unlinking -- 2.1.4