[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y+z9G1VJx9jeCSgr@alley>
Date: Wed, 15 Feb 2023 16:41:15 +0100
From: Petr Mladek <pmladek@...e.com>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Rasmus Villemoes <linux@...musvillemoes.dk>,
Uwe Kleine-König <uwe@...ine-koenig.org>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>,
John Ogness <john.ogness@...utronix.de>,
Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [RESEND v4] printf: fix errname.c list
On Mon 2023-02-06 20:40:57, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> On most architectures, gcc -Wextra warns about the list of error
> numbers containing both EDEADLK and EDEADLOCK:
>
> lib/errname.c:15:67: warning: initialized field overwritten [-Woverride-init]
> 15 | #define E(err) [err + BUILD_BUG_ON_ZERO(err <= 0 || err > 300)] = "-" #err
> | ^~~
> lib/errname.c:172:2: note: in expansion of macro 'E'
> 172 | E(EDEADLK), /* EDEADLOCK */
> | ^
>
> On parisc, a similar error happens with -ECANCELLED, which is an
> alias for ECANCELED.
>
> Make the EDEADLK printing conditional on the number being distinct
> from EDEADLOCK, and remove the -ECANCELLED bit completely as it
> can never be hit.
>
> To ensure these are correct, add static_assert lines that verify
> all the remaining aliases are in fact identical to the canonical
> name.
>
> Fixes: 57f5677e535b ("printf: add support for printing symbolic error names")
> Cc: Petr Mladek <pmladek@...e.com>
> Suggested-by: Rasmus Villemoes <linux@...musvillemoes.dk>
> Acked-by: Uwe Kleine-König <uwe@...ine-koenig.org>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
> Link: https://lore.kernel.org/all/20210514213456.745039-1-arnd@kernel.org/
> Link: https://lore.kernel.org/all/20210927123409.1109737-1-arnd@kernel.org/
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
I have just pushed the patch into printk/linux.git, branch for-6.3.
> I sent this a few times, but it never made it in so far. The warning
> still shows up when enabling extra warnings, and this is an actual bug.
I am sorry for the delay, v3 somehow fallen under cracks. Anyway, v4
seems to be the only resend that I got. v3 was needed because of a
problem reported in v2.
Best Regards,
Petr
Powered by blists - more mailing lists