From: Daniel Thompson <daniel.thompson@linaro.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Jason Wessel <jason.wessel@windriver.com>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ingo Molnar <mingo@elte.hu>,
Douglas Anderson <dianders@chromium.org>,
Christian Brauner <christian.brauner@ubuntu.com>,
kgdb-bugreport@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kgdb: fix gcc-11 warning on indentation
Date: Mon, 22 Mar 2021 17:03:30 +0000 [thread overview]
Message-ID: <20210322170330.wil52d2geopfnfka@maple.lan> (raw)
In-Reply-To: <20210322164308.827846-1-arnd@kernel.org>
On Mon, Mar 22, 2021 at 05:43:03PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> gcc-11 starts warning about misleading indentation inside of macros:
>
> drivers/misc/kgdbts.c: In function ‘kgdbts_break_test’:
> drivers/misc/kgdbts.c:103:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
> 103 | if (verbose > 1) \
> | ^~
> drivers/misc/kgdbts.c:200:9: note: in expansion of macro ‘v2printk’
> 200 | v2printk("kgdbts: breakpoint complete\n");
> | ^~~~~~~~
> drivers/misc/kgdbts.c:105:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
> 105 | touch_nmi_watchdog(); \
> | ^~~~~~~~~~~~~~~~~~
>
> The code looks correct to me, so just reindent it for readability.
>
> Fixes: e8d31c204e36 ("kgdb: add kgdb internal test suite")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Which tree do you want to merge this one though? I've got nothing else
pending for this file so I am very relaxed about the route...
Daniel.
> ---
> drivers/misc/kgdbts.c | 26 +++++++++++++-------------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c
> index 945701bce553..2e081a58da6c 100644
> --- a/drivers/misc/kgdbts.c
> +++ b/drivers/misc/kgdbts.c
> @@ -95,19 +95,19 @@
>
> #include <asm/sections.h>
>
> -#define v1printk(a...) do { \
> - if (verbose) \
> - printk(KERN_INFO a); \
> - } while (0)
> -#define v2printk(a...) do { \
> - if (verbose > 1) \
> - printk(KERN_INFO a); \
> - touch_nmi_watchdog(); \
> - } while (0)
> -#define eprintk(a...) do { \
> - printk(KERN_ERR a); \
> - WARN_ON(1); \
> - } while (0)
> +#define v1printk(a...) do { \
> + if (verbose) \
> + printk(KERN_INFO a); \
> +} while (0)
> +#define v2printk(a...) do { \
> + if (verbose > 1) \
> + printk(KERN_INFO a); \
> + touch_nmi_watchdog(); \
> +} while (0)
> +#define eprintk(a...) do { \
> + printk(KERN_ERR a); \
> + WARN_ON(1); \
> +} while (0)
> #define MAX_CONFIG_LEN 40
>
> static struct kgdb_io kgdbts_io_ops;
> --
> 2.29.2
>
next prev parent reply other threads:[~2021-03-22 17:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-22 16:43 Arnd Bergmann
2021-03-22 17:03 ` Daniel Thompson [this message]
2021-03-22 18:03 ` Arnd Bergmann
2021-03-23 7:28 ` Greg Kroah-Hartman
2021-03-22 17:04 ` Doug Anderson
2021-03-22 18:18 ` Arnd Bergmann
2021-03-22 19:22 ` Doug Anderson
2021-03-22 20:14 ` Jason Wessel
2021-03-22 20:26 ` Arnd Bergmann
2021-03-22 19:23 ` Daniel Thompson
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=20210322170330.wil52d2geopfnfka@maple.lan \
--to=daniel.thompson@linaro.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=christian.brauner@ubuntu.com \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=jason.wessel@windriver.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
all inboxes | Powered by JetHome®