From: Randy Dunlap <rdunlap@infradead.org>
To: Mathieu Malaterre <malat@debian.org>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] powerpc/mm/radix: use do/while(0) trick for single statement block
Date: Mon, 23 Apr 2018 14:13:44 -0700 [thread overview]
Message-ID: <3aa2afca-5d9a-60a2-78d7-9504cf05f78c@infradead.org> (raw)
In-Reply-To: <20180423193638.10535-1-malat@debian.org>
On 04/23/18 12:36, Mathieu Malaterre wrote:
> In commit 7a22d6321c3d ("powerpc/mm/radix: Update command line parsing for
> disable_radix") an `if` statement was added for a possible empty body
> (prom_debug).
>
> Fix the following warning, treated as error with W=1:
>
> arch/powerpc/kernel/prom_init.c:656:46: error: suggest braces around empty body in an ‘if’ statement [-Werror=empty-body]
>
> Suggested-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
> ---
> v2: update macro directly
>
> arch/powerpc/kernel/prom_init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
> index 5ae153b97d0a..7edf3aa5bc6d 100644
> --- a/arch/powerpc/kernel/prom_init.c
> +++ b/arch/powerpc/kernel/prom_init.c
> @@ -103,7 +103,7 @@ int of_workarounds;
> #ifdef DEBUG_PROM
> #define prom_debug(x...) prom_printf(x)
> #else
> -#define prom_debug(x...)
> +#define prom_debug(x...) do { } while (0)
> #endif
>
>
>
--
~Randy
next prev parent reply other threads:[~2018-04-23 21:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-08 19:44 [PATCH] powerpc/mm/radix: add missing braces for single statement block Mathieu Malaterre
2018-04-08 20:34 ` Randy Dunlap
2018-04-23 19:31 ` Mathieu Malaterre
2018-04-23 19:34 ` Mathieu Malaterre
2018-04-23 19:36 ` [PATCH v2] powerpc/mm/radix: use do/while(0) trick " Mathieu Malaterre
2018-04-23 21:13 ` Randy Dunlap [this message]
2018-05-25 11:41 ` [v2] " Michael Ellerman
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=3aa2afca-5d9a-60a2-78d7-9504cf05f78c@infradead.org \
--to=rdunlap@infradead.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=malat@debian.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
/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