From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 69CA97CAA for ; Sat, 15 Jul 2017 19:57:09 +0200 (CEST) Received: by mail-wm0-f42.google.com with SMTP id f67so49033757wmh.1 for ; Sat, 15 Jul 2017 10:57:09 -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=yrsGfFgk4/iVouPqQuDHM+y9THFtrsTYx7cvAgjRImg=; b=pDPghqybDbAP3uYJABXbIULotqr5jtlRxw60lU7Xjd9AXp1+P64K4FIX/rrQOqwRPu YjWJkzUy9LeGFT2Y8GPNO1B5knmrfEPcvpwFPdoI/5GTkT5uGdeEdNudJkONZzHmcboP JTSTOw1mYK1Oq9QiJaXMhVYyeGp6bYBYnixwKrfMX00eUbF4oUI3RcVid/DeEYTgQfuo y4eQrgTkpQUTTha5q5iXb50FEx4CKYrHGMvxf7m/1JorSFpoe5mw77tmY3PfcDsGipUN 5OQOlWDSCm61vaXlX9GoG9/aeonwXEgO7LfeQusCukmk8VWcfSKJbOAA01yCl2xh+uQa puGQ== 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=yrsGfFgk4/iVouPqQuDHM+y9THFtrsTYx7cvAgjRImg=; b=KH+WYeoGVdJgOE6a+HZjZuQ0xQEsX8eLEqHMntKVQvwMmsIMYsoTBXqdptKauDrzKf BxN9E39KSi2R0wiuElhEN/03BRHAfGRDvh2yz3qwhH9K8hRF1YguShULNs4BSGArI+p5 vrR4ZoTViYiqo77FwKPiqaAQlZ7osFs/wXwO0exNuxw1chtUOdDNoUCBiE5KcseilIhS WAnbAw5oagf1pAnssQodRVeMLbYUQlVaADvy77WdMxxNfhwb769r5qcTjmihmK/JQUVO LBmlX5KJlISl2Sgde/lEL8GLNifUprh7jdYgqkoB2CJGPgHwQL//PrakykP87/oNAkEO +pHQ== X-Gm-Message-State: AIVw111E1jSc4I1tS3Gsl5UYwQzLvOiXoC/VtAkJ20QPPu7t7sxUumkH ubJCPn9AJl0YL+fGwwg= X-Received: by 10.28.128.215 with SMTP id b206mr1589560wmd.61.1500141428818; Sat, 15 Jul 2017 10:57:08 -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 79sm2479445wmj.2.2017.07.15.10.57.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 15 Jul 2017 10:57:07 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Sat, 15 Jul 2017 19:56:42 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v4 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: Sat, 15 Jul 2017 17:57:10 -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 2540fb3..2579159 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 cdd197a..9ad1bf1 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -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)); } diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c index 85cf3fc..f7e547a 100644 --- a/lib/librte_eal/common/eal_common_vdev.c +++ b/lib/librte_eal/common/eal_common_vdev.c @@ -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)); } 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