From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Blunck Subject: Re: [PATCH v5 1/7] bus: fix bus name registration Date: Tue, 27 Jun 2017 21:19:14 +0200 Message-ID: References: <206669e001a4561a5f5c10deebcf70742688f380.1497999826.git.gaetan.rivet@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: dev , stable@dpdk.org To: Gaetan Rivet Return-path: In-Reply-To: <206669e001a4561a5f5c10deebcf70742688f380.1497999826.git.gaetan.rivet@6wind.com> 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 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). > 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 >