From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: "Petr Mladek" <pmladek@suse.com>,
"Rasmus Villemoes" <linux@rasmusvillemoes.dk>,
"Uwe Kleine-König" <uwe@kleine-koenig.org>,
"Andy Shevchenko" <andy.shevchenko@gmail.com>,
"Sergey Senozhatsky" <senozhatsky@chromium.org>,
"Steven Rostedt" <rostedt@goodmis.org>,
"John Ogness" <john.ogness@linutronix.de>,
"Arnd Bergmann" <arnd@arndb.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [RESEND v4] printf: fix errname.c list
Date: Tue, 7 Feb 2023 10:51:32 +0900 [thread overview]
Message-ID: <Y+GupENpWtqWXLRs@google.com> (raw)
In-Reply-To: <20230206194126.380350-1-arnd@kernel.org>
On (23/02/06 20:40), Arnd Bergmann wrote:
> 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.
>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
next prev parent reply other threads:[~2023-02-07 1:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-06 19:40 [PATCH] [RESEND v4] printf: fix errname.c list Arnd Bergmann
2023-02-06 19:59 ` Rasmus Villemoes
2023-02-07 1:51 ` Sergey Senozhatsky [this message]
2023-02-15 15:41 ` Petr Mladek
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=Y+GupENpWtqWXLRs@google.com \
--to=senozhatsky@chromium.org \
--cc=andy.shevchenko@gmail.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=uwe@kleine-koenig.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