From: Jeroen Hofstee <jeroen@myspectrum.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] sandbox: change local_irq_save() to macro
Date: Thu, 12 Jun 2014 23:20:20 +0200 [thread overview]
Message-ID: <1402608020.4590.5.camel@yellow> (raw)
In-Reply-To: <1402543575-29150-1-git-send-email-yamada.m@jp.panasonic.com>
On do, 2014-06-12 at 12:26 +0900, Masahiro Yamada wrote:
> local_irq_save() should be a macro, not a function
> because local_irq_save() saves flag to the given argument.
>
> GCC is silent about this issue, but Clang warns:
>
> In file included from lib/asm-offsets.c:15:
> In file included from include/common.h:20:
> In file included from include/linux/bitops.h:110:
> arch/sandbox/include/asm/bitops.h:59:17:
> warning: variable 'flags' is uninitialized when used here
> [-Wuninitialized]
> local_irq_save(flags);
> ^~~~~
>
> That change causes another warning:
>
> In file included from include/linux/bitops.h:110:0,
> from include/common.h:20,
> from lib/asm-offsets.c:15:
> arch/sandbox/include/asm/bitops.h: In function ?test_and_set_bit?:
> arch/sandbox/include/asm/bitops.h:56:16: warning: unused variable ?flags? [-Wunused-variable]
>
> So, flags should be set to __always_unused.
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Regards,
Jeroen
prev parent reply other threads:[~2014-06-12 21:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-12 3:26 [U-Boot] [PATCH v2] sandbox: change local_irq_save() to macro Masahiro Yamada
2014-06-12 4:27 ` Simon Glass
2014-06-12 21:20 ` Jeroen Hofstee [this message]
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=1402608020.4590.5.camel@yellow \
--to=jeroen@myspectrum.nl \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox