public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* linux-next: build failure after merge of all the trees
@ 2025-07-21  7:37 Stephen Rothwell
  2025-07-21 11:42 ` Andy Shevchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2025-07-21  7:37 UTC (permalink / raw)
  To: Linux Next Mailing List
  Cc: Linux Kernel Mailing List, Andy Shevchenko, George Abraham P,
	Herbert Xu, Andrew Morton

[-- 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 --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: linux-next: build failure after merge of all the trees
  2025-07-21  7:37 linux-next: build failure after merge of all the trees Stephen Rothwell
@ 2025-07-21 11:42 ` Andy Shevchenko
  2025-07-21 21:13   ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2025-07-21 11:42 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	George Abraham P, Herbert Xu, Andrew Morton

On Mon, Jul 21, 2025 at 05:37:54PM +1000, Stephen Rothwell wrote:
> 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")

This sounds correct to me and your patch should be sent as a fix to the stable
kernels as well.

> 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.

It just a first who started using the header in the correct way without
proxying others.


-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: build failure after merge of all the trees
  2025-07-21 11:42 ` Andy Shevchenko
@ 2025-07-21 21:13   ` Andrew Morton
  2025-07-21 22:24     ` Stephen Rothwell
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2025-07-21 21:13 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Stephen Rothwell, Linux Next Mailing List,
	Linux Kernel Mailing List, George Abraham P, Herbert Xu

On Mon, 21 Jul 2025 14:42:22 +0300 Andy Shevchenko <andriy.shevchenko@linux•intel.com> wrote:

> > Is there any good reason not to do this?
> > 
> > I guess this patch should have
> > 
> > Fixes: 39ced19b9e60 ("lib/vsprintf: split out sprintf() and friends")
> 
> This sounds correct to me and your patch should be sent as a fix to the stable
> kernels as well.
> 

Yep, thanks, I added the cc:stable, queued it up and shall send to
Linus this week.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: build failure after merge of all the trees
  2025-07-21 21:13   ` Andrew Morton
@ 2025-07-21 22:24     ` Stephen Rothwell
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2025-07-21 22:24 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Andy Shevchenko, Linux Next Mailing List,
	Linux Kernel Mailing List, George Abraham P, Herbert Xu

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

Hi Andrew,

On Mon, 21 Jul 2025 14:13:36 -0700 Andrew Morton <akpm@linux-foundation•org> wrote:
>
> On Mon, 21 Jul 2025 14:42:22 +0300 Andy Shevchenko <andriy.shevchenko@linux•intel.com> wrote:
> 
> > > Is there any good reason not to do this?
> > > 
> > > I guess this patch should have
> > > 
> > > Fixes: 39ced19b9e60 ("lib/vsprintf: split out sprintf() and friends")  
> > 
> > This sounds correct to me and your patch should be sent as a fix to the stable
> > kernels as well.
> 
> Yep, thanks, I added the cc:stable, queued it up and shall send to
> Linus this week.

Thanks, I was going to get around to that this morning.  One less thing
to do :-)

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-21 22:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-21  7:37 linux-next: build failure after merge of all the trees Stephen Rothwell
2025-07-21 11:42 ` Andy Shevchenko
2025-07-21 21:13   ` Andrew Morton
2025-07-21 22:24     ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox