From: "Arnd Bergmann" <arnd@arndb.de>
To: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Peter Zijlstra" <peterz@infradead.org>,
linux-kernel@vger.kernel.org
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
"Brendan Jackman" <jackmanb@google.com>
Subject: Re: [PATCH v1 1/1] bug: Mark __warn_printf() with __printf() attribute
Date: Wed, 04 Feb 2026 17:20:27 +0100 [thread overview]
Message-ID: <86e45719-b97e-4b70-92ba-415eecbf3a5a@app.fastmail.com> (raw)
In-Reply-To: <aYNs6fQLfvLah_iB@smile.fi.intel.com>
On Wed, Feb 4, 2026, at 16:59, Andy Shevchenko wrote:
> +Cc: Arnd (just FYI)
>
> On Mon, Dec 08, 2025 at 03:16:18PM +0100, Andy Shevchenko wrote:
>> __warn_printf() is using printf() type of format, and compiler
>> is not happy about them as is:
>>
>> lib/bug.c:187:25: error: function ‘__warn_printf’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]
>> 187 | vprintk(fmt, *args);
>> | ^~~~~~~
>>
>> Fix the compilation errors by adding __printf() attribute.
>>
>> Fixes: 5c47b7f3d1a9 ("bug: Add BUG_FORMAT_ARGS infrastructure")
>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Yes, I think this is the correct fix. However, Brendan's patch is
now in the tip tree as d36067d6ea00 ("bug: Hush
suggest-attribute=format for __warn_printf()").
I hadn't seen your patch but did notice as well that the one
that was merged is not ideal. I decided against sending a fixup
because it looks harmless, but if you want to rebase your patch,
feel free to add
Acked-by: Arnd Bergmann <arnd@arndb.de>
Arnd
prev parent reply other threads:[~2026-02-04 16:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-08 14:16 Andy Shevchenko
2025-12-16 9:35 ` Brendan Jackman
2026-02-04 15:59 ` Andy Shevchenko
2026-02-04 16:20 ` Arnd Bergmann [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=86e45719-b97e-4b70-92ba-415eecbf3a5a@app.fastmail.com \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=jackmanb@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®