mbox series

[v1,0/6] vsprintf: Add __printf attribute to where it's required

Message ID 20250320180926.4002817-1-andriy.shevchenko@linux.intel.com (mailing list archive)
Headers show
Series vsprintf: Add __printf attribute to where it's required | expand

Message

Andy Shevchenko March 20, 2025, 6:04 p.m. UTC
This whole series started from a simple fix (see the last patch)
to make GCC (Debian 14.2.0-17) happy when compiling with `make W=1`
(note, that CONFIG_WERROR=y and all warnings break the build!)
down to a rabbit hole.

The series is organised in a strict order and can't be split or
reshuffled, otherwise see above.

Also note the last patch has a bit of a hackish approach and
I have no idea how to fix it differently, I tried a few different,
all failed. So, if you think there is a better one, please advise!

I believe the best route for the series is printk tree with immutable
tag or branch for the others.

Andy Shevchenko (6):
  seq_buf: Mark binary printing functions with __printf() attribute
  seq_file: Mark binary printing functions with __printf() attribute
  tracing: Mark binary printing functions with __printf() attribute
  vsnprintf: Mark binary printing functions with __printf() attribute
  vsnprintf: Mark pointer() with __printf() attribute
  vsnprintf: Mark va_format() with __printf() attribute

 include/linux/printk.h    |  5 ++++-
 include/linux/seq_buf.h   |  4 ++--
 include/linux/seq_file.h  |  1 +
 include/linux/string.h    |  4 ++--
 include/linux/trace_seq.h |  7 ++++---
 kernel/trace/trace.c      |  3 ---
 kernel/trace/trace.h      | 16 +++++++++-------
 lib/vsprintf.c            |  9 +++++----
 8 files changed, 27 insertions(+), 22 deletions(-)

Comments

Andy Shevchenko March 20, 2025, 6:32 p.m. UTC | #1
On Thu, Mar 20, 2025 at 08:04:21PM +0200, Andy Shevchenko wrote:
> This whole series started from a simple fix (see the last patch)
> to make GCC (Debian 14.2.0-17) happy when compiling with `make W=1`
> (note, that CONFIG_WERROR=y and all warnings break the build!)
> down to a rabbit hole.
> 
> The series is organised in a strict order and can't be split or
> reshuffled, otherwise see above.
> 
> Also note the last patch has a bit of a hackish approach and
> I have no idea how to fix it differently, I tried a few different,
> all failed. So, if you think there is a better one, please advise!
> 
> I believe the best route for the series is printk tree with immutable
> tag or branch for the others.

Alternatively first 4 can be done first as they are pretty much
straightforward. They also can be squashed to one (as the same
topic behind), but it all is up to the respective maintainers.