[dpdk-dev] [PATCH v3] log: register with standardized names

Bruce Richardson bruce.richardson at intel.com
Tue May 11 14:24:31 CEST 2021


On Tue, May 11, 2021 at 02:10:47PM +0200, Thomas Monjalon wrote:
> 11/05/2021 13:59, Bruce Richardson:
> > On Tue, May 11, 2021 at 12:09:27PM +0200, Thomas Monjalon wrote:
> > > --- a/drivers/meson.build
> > > +++ b/drivers/meson.build
> > > @@ -59,6 +59,11 @@ foreach subpath:subdirs
> > >          drivers += driver_path[1]
> > >      else
> > >          class = subpath
> > > +    endif
> > > +
> > > +    log_prefix = 'pmd.' + class
> > > +
> > > +    if drivers.length() == 0
> > >          subdir(class)
> > >      endif
> > >  
> > 
> > Minor nit - rather than splitting the existing block here, I suggest
> > setting log_prefix = '' at the start of the loop, and leaving the existing
> > else as-is. Then after the "subdir(class)" just check if log_prefix ==
> > '' and then set it to the default. I think it might be easier to read that
> > way. [See suggested change below (untested)]
> > 
> > /Bruce
> > 
> > diff --git a/drivers/meson.build b/drivers/meson.build
> > index 0052247a5..9d518d361 100644
> > --- a/drivers/meson.build
> > +++ b/drivers/meson.build
> > @@ -51,6 +51,7 @@ endif
> >  foreach subpath:subdirs
> >      drivers = []
> >      std_deps = []
> > +    log_prefix = ''
> > 
> >      # subpath can be either "class" or "class/driver"
> >      if subpath.contains('/')
> > @@ -62,6 +63,10 @@ foreach subpath:subdirs
> >          subdir(class)
> >      endif
> > 
> > +    if log_prefix == '':
> > +        log_prefix = 'pmd.' + class
> > +    endif
> > +
> 
> OK with this change, I'll send a v4.
> 
> Nit: please remove useless huge context when replying :)
>
+1 I had planned to - I just forgot to do so before hitting send! 


More information about the dev mailing list