From patchwork Fri Jul 7 00:09:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ga=C3=ABtan_Rivet?= X-Patchwork-Id: 26596 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 3E6AF7CD1; Fri, 7 Jul 2017 02:10:28 +0200 (CEST) Received: from mail-wr0-f170.google.com (mail-wr0-f170.google.com [209.85.128.170]) by dpdk.org (Postfix) with ESMTP id 71CD958CE for ; Fri, 7 Jul 2017 02:10:06 +0200 (CEST) Received: by mail-wr0-f170.google.com with SMTP id k67so24226086wrc.2 for ; Thu, 06 Jul 2017 17:10:06 -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=VzV9TL3eRH8G4kUv5Cvo7QMyIktNY6D75IZjja75otQ=; b=Y+LtKbIaEhTuTW0c62nRmV1BPEIzajlNw3pDhD9toyOt2z2sYs8sD6KeXu3DlOW21g 7xcVi54K6CNQM08lY1uWeqy+waFWWBmZdebpOHecm74VlJd5sa5C2/YlpjZ5RjsZrydB tP8meNZQvdIOt2/cgF/CUgfOTua4KgLTjM2ngCWlxiFxei00tyax6EvX4Xy8jTX7PWXf z4ZVeN2EFI8j7jDarGH+IKz2Zn37RA38rmOAbrGRwXxo87wu9PY1b4ge7dM5EcQbsVuK L35NwxdSOrm/PZiPpWBAWBN3mFHW28C8BwnU0KM745YoTG4rou/5vl6UI4rkfBV4gGyD LF/A== 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=VzV9TL3eRH8G4kUv5Cvo7QMyIktNY6D75IZjja75otQ=; b=QW79v0gvi3O4GmOdHfUuWro63iNW9G0HimInwrpXLYhjzYyW3i3lDz0iRdAuxfWLYk YM1eVIEii0QgCZm8CaQ0/z2Axp2facArv5rYiGJLhJzey8xI1amtxzjqJ4dQ3JyV1BpE 2PBk4VSiK+whHQ5RaD0JGKZk4lkY+CDOvNhwpEo8A80cCnF7oT2cBJ7M73TtFgqNChH8 HbJbVgq8qwBnsDpWZLGD7K3TTEqU2k91F3ttQ/AibN1UzPlvr6ETItUcwGOxQQx5UbaZ 6nfbbU29AMIBMEWd22ARwPCENeid3sv3VNd4UbYdaZEk7G1UfT7ThEm6sbVT6+a4U3tQ EZOA== X-Gm-Message-State: AIVw110HbHkHsyIaEho1CKOm5lVBSqauzwhcKaGxl4041dfk0b6R3iFi VGR4PwVNwAPdCT7qC9s= X-Received: by 10.28.107.135 with SMTP id a7mr289296wmi.117.1499386205917; Thu, 06 Jul 2017 17:10:05 -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 f45sm2391166wrf.2.2017.07.06.17.10.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Jul 2017 17:10:05 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Fri, 7 Jul 2017 02:09:17 +0200 Message-Id: <83f4678e9342a631dee7f2fc359644fd59e91de4.1499385282.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 v6 10/22] 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. 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 143c231..42e91db 100644 --- a/lib/librte_eal/common/eal_common_dev.c +++ b/lib/librte_eal/common/eal_common_dev.c @@ -188,7 +188,7 @@ 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 a9a04db..adfe644 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -535,7 +535,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 5f1c224..ea3917a 100644 --- a/lib/librte_eal/common/eal_common_vdev.c +++ b/lib/librte_eal/common/eal_common_vdev.c @@ -356,7 +356,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 37cc230..167635a 100644 --- a/lib/librte_eal/common/include/rte_bus.h +++ b/lib/librte_eal/common/include/rte_bus.h @@ -114,15 +114,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