]> git.droids-corp.org - dpdk.git/commitdiff
bus: remove useless plug parameter
authorGaetan Rivet <gaetan.rivet@6wind.com>
Sat, 15 Jul 2017 17:56:42 +0000 (19:56 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 19 Jul 2017 21:40:28 +0000 (00:40 +0300)
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 <gaetan.rivet@6wind.com>
lib/librte_eal/common/eal_common_dev.c
lib/librte_eal/common/eal_common_pci.c
lib/librte_eal/common/eal_common_vdev.c
lib/librte_eal/common/include/rte_bus.h

index a815bae66a66b8cb556cf7fb20c4461edc67d735..e10b9fd8506f79f1084c541e18411655fcb68050 100644 (file)
@@ -187,7 +187,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);
index cdd197a5d79839e29ae4275e3cc5302a8f4ad5a1..9ad1bf13a013931736265d6f95724f633a5d854d 100644 (file)
@@ -541,7 +541,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));
 }
index 85cf3fc62f5c4613d27edcc69ec41d67bcbdf997..f7e547a683f53c1e9aec0645cd9f9bf3913304f4 100644 (file)
@@ -319,7 +319,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));
 }
index af9f0e13f9b4fb3a0c1a950e1abfb22b255a3e88..c79368d3c88225d8952be4434cce05d55fedd2a9 100644 (file)
@@ -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