From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Linux Next Mailing List <linux-next@vger•kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux•intel.com>,
George Abraham P <george.abraham.p@intel•com>,
Herbert Xu <herbert@gondor•apana.org.au>,
Andrew Morton <akpm@linux-foundation•org>
Subject: linux-next: build failure after merge of all the trees
Date: Mon, 21 Jul 2025 17:37:54 +1000 [thread overview]
Message-ID: <20250721173754.42865913@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 4245 bytes --]
Hi all,
After merging all the trees, today's linux-next build (powerpc
allyesconfig) failed like this:
In file included from drivers/crypto/intel/qat/qat_common/adf_pm_dbgfs_utils.c:4:
include/linux/sprintf.h:11:54: error: unknown type name 'va_list'
11 | __printf(2, 0) int vsprintf(char *buf, const char *, va_list);
| ^~~~~~~
include/linux/sprintf.h:1:1: note: 'va_list' is defined in header '<stdarg.h>'; this is probably fixable by adding '#include <stdarg.h>'
+++ |+#include <stdarg.h>
1 | /* SPDX-License-Identifier: GPL-2.0 */
include/linux/sprintf.h:13:71: error: unknown type name 'va_list'
13 | __printf(3, 0) int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
| ^~~~~~~
include/linux/sprintf.h:13:71: note: 'va_list' is defined in header '<stdarg.h>'; this is probably fixable by adding '#include <stdarg.h>'
include/linux/sprintf.h:15:72: error: unknown type name 'va_list'
15 | __printf(3, 0) int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
| ^~~~~~~
include/linux/sprintf.h:15:72: note: 'va_list' is defined in header '<stdarg.h>'; this is probably fixable by adding '#include <stdarg.h>'
include/linux/sprintf.h:17:70: error: unknown type name 'va_list'
17 | __printf(2, 0) __malloc char *kvasprintf(gfp_t gfp, const char *fmt, va_list args);
| ^~~~~~~
include/linux/sprintf.h:17:70: note: 'va_list' is defined in header '<stdarg.h>'; this is probably fixable by adding '#include <stdarg.h>'
include/linux/sprintf.h:18:73: error: unknown type name 'va_list'
18 | __printf(2, 0) const char *kvasprintf_const(gfp_t gfp, const char *fmt, va_list args);
| ^~~~~~~
include/linux/sprintf.h:18:73: note: 'va_list' is defined in header '<stdarg.h>'; this is probably fixable by adding '#include <stdarg.h>'
include/linux/sprintf.h:21:55: error: unknown type name 'va_list'
21 | __scanf(2, 0) int vsscanf(const char *, const char *, va_list);
| ^~~~~~~
include/linux/sprintf.h:21:55: note: 'va_list' is defined in header '<stdarg.h>'; this is probably fixable by adding '#include <stdarg.h>'
I don't know what root caused this, but I have applied the following
patch for today.
From: Stephen Rothwell <sfr@canb•auug.org.au>
Date: Mon, 21 Jul 2025 16:15:57 +1000
Subject: [PATCH] sprintf.h requires stdarg.h
In file included from drivers/crypto/intel/qat/qat_common/adf_pm_dbgfs_utils.c:4:
include/linux/sprintf.h:11:54: error: unknown type name 'va_list'
11 | __printf(2, 0) int vsprintf(char *buf, const char *, va_list);
| ^~~~~~~
include/linux/sprintf.h:1:1: note: 'va_list' is defined in header '<stdarg.h>'; this is probably fixable by adding '#include <stdarg.h>'
Signed-off-by: Stephen Rothwell <sfr@canb•auug.org.au>
---
include/linux/sprintf.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/sprintf.h b/include/linux/sprintf.h
index 521bb2cd2648..f06f7b785091 100644
--- a/include/linux/sprintf.h
+++ b/include/linux/sprintf.h
@@ -4,6 +4,7 @@
#include <linux/compiler_attributes.h>
#include <linux/types.h>
+#include <linux/stdarg.h>
int num_to_str(char *buf, int size, unsigned long long num, unsigned int width);
--
2.50.1
Is there any good reason not to do this?
I guess this patch should have
Fixes: 39ced19b9e60 ("lib/vsprintf: split out sprintf() and friends")
but that is not the immediate cause. This has been exposed by the
inclusion of a new file
(drivers/crypto/intel/qat/qat_common/adf_pm_dbgfs_utils.c in commit
7c68005a4610 ("crypto: qat - relocate power management debugfs helper
APIs"). Maybe every other use of sprintf.h also has (explicitly or
implicitly) an include of stdarg.h - possibly via kernel.h.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2025-07-21 7:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-21 7:37 Stephen Rothwell [this message]
2025-07-21 11:42 ` linux-next: build failure after merge of all the trees Andy Shevchenko
2025-07-21 21:13 ` Andrew Morton
2025-07-21 22:24 ` Stephen Rothwell
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=20250721173754.42865913@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=akpm@linux-foundation$(echo .)org \
--cc=andriy.shevchenko@linux$(echo .)intel.com \
--cc=george.abraham.p@intel$(echo .)com \
--cc=herbert@gondor$(echo .)apana.org.au \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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