[RFC 0/8] x86: Mad WARN() hackery

From: Peter Zijlstra
Date: Mon Jun 02 2025 - 11:22:04 EST


Hi,

I've been annoyed at how WARN() works for quite some time, and Alessandro has
been trying to make it even worse.

This is an attempt at making WARN() generate less crap for the most common
cases. It is somewhat magical, but appears to be working for the simple cases
I've tried. Specifically, it moves the __warn_printf() into the exception for
the case of 3 or less arguments.

This would hopefully allow Allesandro to put the kunit hackery in report_bug()
and not spread it around all the WARN() sites like he does now.