All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 01/23] log: Correct definition of log_msg_ret()
Date: Thu, 15 Nov 2018 18:44:51 -0800	[thread overview]
Message-ID: <CAPnjgZ2D21wf00FcM8MBn7Lj95XjqLgGJFLwwFWfQiT3P0GHXA@mail.gmail.com> (raw)
In-Reply-To: <CAEUhbmUY3u6Ha2mjfh2Y7qxpDCRrHCzxBDq1VTm00X+Pd_A+OA@mail.gmail.com>

Hi Bin,

On 15 November 2018 at 17:43, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Hi Simon,
>
> On Fri, Nov 16, 2018 at 8:08 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > Hi Bin,
> >
> > On 4 October 2018 at 02:25, Bin Meng <bmeng.cn@gmail.com> wrote:
> > >
> > > Hi Simon,
> > >
> > > On Tue, Oct 2, 2018 at 8:25 PM Simon Glass <sjg@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@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/

OK good. I'm not sure what I was thinking when I omitted the documentation...

Regards,
Simon

  reply	other threads:[~2018-11-16  2:44 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-02 11:22 [U-Boot] [PATCH v2 00/23] spl: Add features for passing info from SPL to U-Boot proper Simon Glass
2018-10-02 11:22 ` [U-Boot] [PATCH v2 01/23] log: Correct definition of log_msg_ret() Simon Glass
2018-10-04  9:25   ` Bin Meng
2018-11-16  0:07     ` Simon Glass
2018-11-16  1:43       ` Bin Meng
2018-11-16  2:44         ` Simon Glass [this message]
2018-10-02 11:22 ` [U-Boot] [PATCH v2 02/23] spl: Add support for logging in SPL and TPL Simon Glass
2018-11-09 18:42   ` [U-Boot] [U-Boot, v2, " Tom Rini
2018-10-02 11:22 ` [U-Boot] [PATCH v2 03/23] Add core support for a bloblist to convey data from SPL Simon Glass
2018-10-08  2:42   ` Kever Yang
2018-10-09  3:40     ` Simon Glass
2018-11-09 18:42   ` [U-Boot] [U-Boot, v2, " Tom Rini
2018-10-02 11:22 ` [U-Boot] [PATCH v2 04/23] spl: Set up the bloblist in SPL Simon Glass
2018-11-09 18:43   ` [U-Boot] [U-Boot,v2,04/23] " Tom Rini
2018-11-16  0:07     ` Simon Glass
2018-11-16  0:10       ` Tom Rini
2018-11-16  0:29         ` Simon Glass
2018-10-02 11:22 ` [U-Boot] [PATCH v2 05/23] bloblist: Locate bloblist in U-Boot Simon Glass
2018-11-09 18:43   ` [U-Boot] [U-Boot,v2,05/23] " Tom Rini
2018-10-02 11:22 ` [U-Boot] [PATCH v2 06/23] test: Add a simple test for bloblist Simon Glass
2018-10-02 11:22 ` [U-Boot] [PATCH v2 07/23] Add bloblist documentation Simon Glass
2018-10-02 11:22 ` [U-Boot] [PATCH v2 08/23] spl: Support hash, input, pch, pci, rtc, tpm in SPL Simon Glass
2018-11-09 18:43   ` [U-Boot] [U-Boot, v2, " Tom Rini
2018-10-02 11:22 ` [U-Boot] [PATCH v2 09/23] spl: Add a define for SPL_TPL_PROMPT Simon Glass
2018-11-09 18:43   ` [U-Boot] [U-Boot, v2, " Tom Rini
2018-10-02 11:22 ` [U-Boot] [PATCH v2 10/23] spl: Make SPL_DISABLE_BANNER_PRINT a positive option Simon Glass
2018-11-09 18:43   ` [U-Boot] [U-Boot, v2, " Tom Rini
2018-10-02 11:22 ` [U-Boot] [PATCH v2 11/23] spl: Add a comment to spl_set_bd() Simon Glass
2018-11-09 18:43   ` [U-Boot] [U-Boot,v2,11/23] " Tom Rini
2019-02-11 21:00     ` Simon Goldschmidt
2019-02-21  2:47       ` Simon Glass
2019-02-21  5:43         ` Simon Goldschmidt
2019-03-10 21:50           ` Simon Glass
2018-10-02 11:22 ` [U-Boot] [PATCH v2 12/23] spl: Print a message if we are unable to load an image Simon Glass
2018-11-09 18:43   ` [U-Boot] [U-Boot, v2, " Tom Rini
2018-11-16  0:08     ` Simon Glass
2018-10-02 11:22 ` [U-Boot] [PATCH v2 13/23] sandbox: Add a memory map to the sandbox README Simon Glass
2018-10-02 11:22 ` [U-Boot] [PATCH v2 14/23] test/py: Add a way to pass flags to sandbox Simon Glass
2018-10-02 11:22 ` [U-Boot] [PATCH v2 15/23] sandbox: Add an option to display of-platdata in SPL Simon Glass
2018-10-02 11:22 ` [U-Boot] [PATCH v2 16/23] sandbox: Drop the deprecated 'sb' command Simon Glass
2018-10-02 11:22 ` [U-Boot] [PATCH v2 17/23] sandbox: Add a new " Simon Glass
2018-10-02 11:22 ` [U-Boot] [PATCH v2 18/23] sandbox: Allow puts() output before global_data is set up Simon Glass
2018-10-02 11:22 ` [U-Boot] [PATCH v2 19/23] sandbox: Refactor code to create os_jump_to_file() Simon Glass
2018-10-02 11:22 ` [U-Boot] [PATCH v2 20/23] sandbox: Use malloc() and free() from os layer Simon Glass
2018-10-02 11:22 ` [U-Boot] [PATCH v2 21/23] sandbox: Filter arguments when starting U-Boot Simon Glass
2018-10-02 11:22 ` [U-Boot] [PATCH v2 22/23] sandbox: Boot in U-Boot through the standard call Simon Glass
2018-10-02 11:22 ` [U-Boot] [PATCH v2 23/23] spl: Add support for passing handoff info to U-Boot proper Simon Glass
2018-11-09 18:43   ` [U-Boot] [U-Boot, v2, " Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPnjgZ2D21wf00FcM8MBn7Lj95XjqLgGJFLwwFWfQiT3P0GHXA@mail.gmail.com \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.