[PATCH v3 1/2] watchdog: it87_wdt: Don't use "proxy" headers

Andy Shevchenko posted 2 patches 3 months ago
[PATCH v3 1/2] watchdog: it87_wdt: Don't use "proxy" headers
Posted by Andy Shevchenko 3 months ago
Update header inclusions to follow IWYU (Include What You Use)
principle.

Note that kernel.h is discouraged to be included as it's written
at the top of that file.

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

diff --git a/drivers/watchdog/it87_wdt.c b/drivers/watchdog/it87_wdt.c
index a1e23dce8810..3b8488c86a2f 100644
--- a/drivers/watchdog/it87_wdt.c
+++ b/drivers/watchdog/it87_wdt.c
@@ -22,11 +22,13 @@
 
 #include <linux/bits.h>
 #include <linux/dmi.h>
+#include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/kernel.h>
+#include <linux/ioport.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
+#include <linux/printk.h>
 #include <linux/types.h>
 #include <linux/watchdog.h>
 
-- 
2.47.2
Re: [PATCH v3 1/2] watchdog: it87_wdt: Don't use "proxy" headers
Posted by Guenter Roeck 2 months, 3 weeks ago
On 7/8/25 06:33, Andy Shevchenko wrote:
> Update header inclusions to follow IWYU (Include What You Use)
> principle.
> 
> Note that kernel.h is discouraged to be included as it's written
> at the top of that file.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/watchdog/it87_wdt.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/it87_wdt.c b/drivers/watchdog/it87_wdt.c
> index a1e23dce8810..3b8488c86a2f 100644
> --- a/drivers/watchdog/it87_wdt.c
> +++ b/drivers/watchdog/it87_wdt.c
> @@ -22,11 +22,13 @@
>   
>   #include <linux/bits.h>
>   #include <linux/dmi.h>
> +#include <linux/errno.h>
>   #include <linux/init.h>
>   #include <linux/io.h>
> -#include <linux/kernel.h>
> +#include <linux/ioport.h>
>   #include <linux/module.h>
>   #include <linux/moduleparam.h>
> +#include <linux/printk.h>
>   #include <linux/types.h>
>   #include <linux/watchdog.h>
>