[U-Boot] [PATCH v2 01/23] log: Correct definition of log_msg_ret()

Bin Meng bmeng.cn at gmail.com
Fri Nov 16 01:43:27 UTC 2018


Hi Simon,

On Fri, Nov 16, 2018 at 8:08 AM Simon Glass <sjg at chromium.org> wrote:
>
> Hi Bin,
>
> On 4 October 2018 at 02:25, Bin Meng <bmeng.cn at gmail.com> wrote:
> >
> > Hi Simon,
> >
> > On Tue, Oct 2, 2018 at 8:25 PM Simon Glass <sjg at chromium.org> wrote:
> > >
> > > This macro should have two parameters, not one. Fix it so that it
> > > correctly resolves to _ret when logging is disabled.
> > >
> > > Signed-off-by: Simon Glass <sjg at chromium.org>
> > > ---
> > >
> > > Changes in v2: None
> > >
> > >  include/log.h | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/include/log.h b/include/log.h
> > > index 653fb8d853e..75ff1e1160c 100644
> > > --- a/include/log.h
> > > +++ b/include/log.h
> > > @@ -175,7 +175,7 @@ void __assert_fail(const char *assertion, const char *file, unsigned int line,
> > >         })
> > >  #else
> > >  #define log_ret(_ret) (_ret)
> > > -#define log_msg_ret(_ret) (_ret)
> > > +#define log_msg_ret(_msg, _ret) (_ret)
> >
> > This creates a warning still if logging is disabled.
> >
> > include/log.h:178:33: warning: statement with no effect [-Wunused-value]
> >  #define log_msg_ret(_msg, _ret) (_ret)
>
> It has to be used in a 'return' statement. I'll add a comment in the
> first patch of the spl handoff series.
>

Yes, it seems I have noticed this and see my patch here :)
http://patchwork.ozlabs.org/patch/996894/

Regards,
Bin


More information about the U-Boot mailing list