* [PATCH v1 1/1] watchdog: Don't use "proxy" headers
@ 2025-06-26 16:51 Andy Shevchenko
2025-06-26 18:02 ` Andy Shevchenko
2025-06-27 0:14 ` kernel test robot
0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2025-06-26 16:51 UTC (permalink / raw)
To: Andy Shevchenko, linux-watchdog, linux-kernel
Cc: Wim Van Sebroeck, Guenter Roeck
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>
---
include/linux/watchdog.h | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h
index 99660197a36c..8c60687a3e55 100644
--- a/include/linux/watchdog.h
+++ b/include/linux/watchdog.h
@@ -9,14 +9,18 @@
#ifndef _LINUX_WATCHDOG_H
#define _LINUX_WATCHDOG_H
-
#include <linux/bitops.h>
-#include <linux/cdev.h>
-#include <linux/device.h>
-#include <linux/kernel.h>
+#include <linux/limits.h>
#include <linux/notifier.h>
+#include <linux/printk.h>
+#include <linux/types.h>
+
#include <uapi/linux/watchdog.h>
+struct attribute_group;
+struct device;
+struct module;
+
struct watchdog_ops;
struct watchdog_device;
struct watchdog_core_data;
--
2.47.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] watchdog: Don't use "proxy" headers
2025-06-26 16:51 [PATCH v1 1/1] watchdog: Don't use "proxy" headers Andy Shevchenko
@ 2025-06-26 18:02 ` Andy Shevchenko
2025-06-27 0:14 ` kernel test robot
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2025-06-26 18:02 UTC (permalink / raw)
To: linux-watchdog, linux-kernel; +Cc: Wim Van Sebroeck, Guenter Roeck
On Thu, Jun 26, 2025 at 07:51:45PM +0300, 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.
This doesn't compile in some cases, please ignore. I will send a v2 shortly
after additional testing.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] watchdog: Don't use "proxy" headers
2025-06-26 16:51 [PATCH v1 1/1] watchdog: Don't use "proxy" headers Andy Shevchenko
2025-06-26 18:02 ` Andy Shevchenko
@ 2025-06-27 0:14 ` kernel test robot
1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2025-06-27 0:14 UTC (permalink / raw)
To: Andy Shevchenko, linux-watchdog, linux-kernel
Cc: oe-kbuild-all, Wim Van Sebroeck, Guenter Roeck
Hi Andy,
kernel test robot noticed the following build errors:
[auto build test ERROR on groeck-staging/hwmon-next]
[also build test ERROR on linus/master v6.16-rc3 next-20250626]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/watchdog-Don-t-use-proxy-headers/20250627-005755
base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
patch link: https://lore.kernel.org/r/20250626165145.327685-1-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v1 1/1] watchdog: Don't use "proxy" headers
config: arc-randconfig-001-20250627 (https://download.01.org/0day-ci/archive/20250627/202506270716.ol1Llg7E-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250627/202506270716.ol1Llg7E-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506270716.ol1Llg7E-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/watchdog/watchdog_pretimeout.c:12:
>> drivers/watchdog/watchdog_core.h:41:16: error: field 'dev' has incomplete type
struct device dev;
^~~
drivers/watchdog/watchdog_core.h:42:14: error: field 'cdev' has incomplete type
struct cdev cdev;
^~~~
drivers/watchdog/watchdog_pretimeout.c: In function 'watchdog_pretimeout_available_governors_get':
>> drivers/watchdog/watchdog_pretimeout.c:59:12: error: implicit declaration of function 'sysfs_emit_at'; did you mean 'sysfs_streq'? [-Werror=implicit-function-declaration]
count += sysfs_emit_at(buf, count, "%s\n", priv->gov->name);
^~~~~~~~~~~~~
sysfs_streq
drivers/watchdog/watchdog_pretimeout.c: In function 'watchdog_pretimeout_governor_get':
>> drivers/watchdog/watchdog_pretimeout.c:72:11: error: implicit declaration of function 'sysfs_emit'; did you mean 'sysfs_streq'? [-Werror=implicit-function-declaration]
count = sysfs_emit(buf, "%s\n", wdd->gov->name);
^~~~~~~~~~
sysfs_streq
cc1: some warnings being treated as errors
vim +/dev +41 drivers/watchdog/watchdog_core.h
45f5fed30a6460e Alan Cox 2012-05-10 31
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 32 /*
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 33 * struct watchdog_core_data - watchdog core internal data
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 34 * @dev: The watchdog's internal device
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 35 * @cdev: The watchdog's Character device.
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 36 * @wdd: Pointer to watchdog device.
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 37 * @lock: Lock for watchdog core.
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 38 * @status: Watchdog core internal status bits.
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 39 */
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 40 struct watchdog_core_data {
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 @41 struct device dev;
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 42 struct cdev cdev;
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 43 struct watchdog_device *wdd;
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 44 struct mutex lock;
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 45 ktime_t last_keepalive;
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 46 ktime_t last_hw_keepalive;
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 47 ktime_t open_deadline;
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 48 struct hrtimer timer;
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 49 struct kthread_work work;
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 50 #if IS_ENABLED(CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT)
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 51 struct hrtimer pretimeout_timer;
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 52 #endif
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 53 unsigned long status; /* Internal status bits */
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 54 #define _WDOG_DEV_OPEN 0 /* Opened ? */
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 55 #define _WDOG_ALLOW_RELEASE 1 /* Did we receive the magic char ? */
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 56 #define _WDOG_KEEPALIVE 2 /* Did we receive a keepalive ? */
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 57 };
7b7d2fdc8c3e3f9 Curtis Klein 2021-02-03 58
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-27 0:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-26 16:51 [PATCH v1 1/1] watchdog: Don't use "proxy" headers Andy Shevchenko
2025-06-26 18:02 ` Andy Shevchenko
2025-06-27 0:14 ` kernel test robot
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).