bug: Hush suggest-attribute=format for __warn_printf()

Recent additions to this function cause GCC 14.3.0 to get excited
(W=1) and suggest a missing attribute:

lib/bug.c: In function '__warn_printf':
lib/bug.c:187:25: error: function '__warn_printf' be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]
187 | vprintk(fmt, *args);
| ^~~~~~~

Disable the diagnostic locally, following the pattern used for stuff
like va_format().

Fixes: 5c47b7f3d1a9 ("bug: Add BUG_FORMAT_ARGS infrastructure")
Signed-off-by: Brendan Jackman <jackmanb@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://patch.msgid.link/20251207-warn-printf-gcc-v1-1-b597d612b94b@google.com

authored by Brendan Jackman and committed by Ingo Molnar d36067d6 b5e51ef7

+4
+4
lib/bug.c
··· 173 173 return module_find_bug(bugaddr); 174 174 } 175 175 176 + __diag_push(); 177 + __diag_ignore(GCC, all, "-Wsuggest-attribute=format", 178 + "Not a valid __printf() conversion candidate."); 176 179 static void __warn_printf(const char *fmt, struct pt_regs *regs) 177 180 { 178 181 if (!fmt) ··· 195 192 196 193 printk("%s", fmt); 197 194 } 195 + __diag_pop(); 198 196 199 197 static enum bug_trap_type __report_bug(struct bug_entry *bug, unsigned long bugaddr, struct pt_regs *regs) 200 198 {