23/03/2021 19:22, David Marchand:
> On Wed, Mar 10, 2021 at 3:01 PM Thomas Monjalon <tho...@monjalon.net> wrote:
> >
> > In the unlikely case where something goes wrong
> > while registering a log type,
> > the fallback is to use the log type 0, assigned to EAL.
> >
> > Signed-off-by: Thomas Monjalon <tho...@monjalon.net>
[...]
> >  {                                                                      \
> >         type = rte_log_register_type_and_pick_level(RTE_STR(name),      \
> >                                                     RTE_LOG_##level);   \
> > +       type = RTE_MAX(0, type);                                        \
> >  }
> 
> Hard to read and to grep, can we use explicit logtype?
> 
> if (type < 0)
>     type = RTE_LOGTYPE_EAL;

Yes I agree it is better because we can grep the explicit name.


Reply via email to