linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] cpuidle: Update header inclusion
@ 2025-11-24 20:57 Andy Shevchenko
  2025-11-25 18:05 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2025-11-24 20:57 UTC (permalink / raw)
  To: Andy Shevchenko, linux-pm, linux-kernel; +Cc: Rafael J. Wysocki, Daniel Lezcano

While cleaning up some headers, I got a build error on this file:

drivers/cpuidle/poll_state.c:52:2: error: call to undeclared library function 'snprintf' with type 'int (char *restrict, unsigned long, const char *restrict, ...)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

Update header inclusions to follow IWYU (Include What You Use)
principle.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/cpuidle/poll_state.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/cpuidle/poll_state.c b/drivers/cpuidle/poll_state.c
index 9b6d90a72601..c7524e4c522a 100644
--- a/drivers/cpuidle/poll_state.c
+++ b/drivers/cpuidle/poll_state.c
@@ -4,9 +4,13 @@
  */
 
 #include <linux/cpuidle.h>
+#include <linux/export.h>
+#include <linux/irqflags.h>
 #include <linux/sched.h>
 #include <linux/sched/clock.h>
 #include <linux/sched/idle.h>
+#include <linux/sprintf.h>
+#include <linux/types.h>
 
 #define POLL_IDLE_RELAX_COUNT	200
 
-- 
2.50.1


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

* Re: [PATCH v1 1/1] cpuidle: Update header inclusion
  2025-11-24 20:57 [PATCH v1 1/1] cpuidle: Update header inclusion Andy Shevchenko
@ 2025-11-25 18:05 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2025-11-25 18:05 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-pm, linux-kernel, Rafael J. Wysocki, Daniel Lezcano

On Mon, Nov 24, 2025 at 9:58 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> While cleaning up some headers, I got a build error on this file:
>
> drivers/cpuidle/poll_state.c:52:2: error: call to undeclared library function 'snprintf' with type 'int (char *restrict, unsigned long, const char *restrict, ...)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>
> Update header inclusions to follow IWYU (Include What You Use)
> principle.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/cpuidle/poll_state.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/cpuidle/poll_state.c b/drivers/cpuidle/poll_state.c
> index 9b6d90a72601..c7524e4c522a 100644
> --- a/drivers/cpuidle/poll_state.c
> +++ b/drivers/cpuidle/poll_state.c
> @@ -4,9 +4,13 @@
>   */
>
>  #include <linux/cpuidle.h>
> +#include <linux/export.h>
> +#include <linux/irqflags.h>
>  #include <linux/sched.h>
>  #include <linux/sched/clock.h>
>  #include <linux/sched/idle.h>
> +#include <linux/sprintf.h>
> +#include <linux/types.h>
>
>  #define POLL_IDLE_RELAX_COUNT  200
>
> --

Applied as 6.19 material, thanks!

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

end of thread, other threads:[~2025-11-25 18:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-24 20:57 [PATCH v1 1/1] cpuidle: Update header inclusion Andy Shevchenko
2025-11-25 18:05 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).