From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet Subject: Re: [PATCH v5 1/7] bus: fix bus name registration Date: Tue, 4 Jul 2017 03:05:01 +0200 Message-ID: <20170704010501.GA11154@bidouze.vm.6wind.com> References: <206669e001a4561a5f5c10deebcf70742688f380.1497999826.git.gaetan.rivet@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: dev , stable@dpdk.org To: Jan Blunck 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 14D452A58 for ; Tue, 4 Jul 2017 03:05:16 +0200 (CEST) Received: by mail-wm0-f42.google.com with SMTP id w126so181644482wme.0 for ; Mon, 03 Jul 2017 18:05:16 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Jun 27, 2017 at 09:19:14PM +0200, Jan Blunck wrote: > On Wed, Jun 21, 2017 at 1:30 AM, Gaetan Rivet wrote: > > The default bus registration function should not result in buses > > registering with double quotes within their names. > > > > This is breaking expectations with users. All other registration macro > pass the names through the stringification. The problem is that you > pass in the name as a string already ("PCI" instead of PCI). > > I agree that it does not behave as expected. However, all buses are currently using it this way, and this cannot be fixed if maintainers keep using public define's for their bus name. > > Fixes: a97725791eec ("bus: introduce bus abstraction") > > Cc: stable@dpdk.org > > > > Signed-off-by: Gaetan Rivet > > --- > > lib/librte_eal/common/include/rte_bus.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h > > index fcc2442..b220299 100644 > > --- a/lib/librte_eal/common/include/rte_bus.h > > +++ b/lib/librte_eal/common/include/rte_bus.h > > @@ -254,7 +254,7 @@ struct rte_bus *rte_bus_find_by_device(const struct rte_device *dev); > > #define RTE_REGISTER_BUS(nm, bus) \ > > static void __attribute__((constructor(101), used)) businitfn_ ##nm(void) \ > > {\ > > - (bus).name = RTE_STR(nm);\ > > + (bus).name = nm;\ > > rte_bus_register(&bus); \ > > } > > > > -- > > 2.1.4 > > -- Gaëtan Rivet 6WIND