Re: [PATCH] watchdog: make nowayout sysfs file writable

From: Rasmus Villemoes
Date: Wed Nov 06 2019 - 02:44:47 EST


On 05/11/2019 22.16, kbuild test robot wrote:

> In file included from include/linux/mutex.h:14:0,
> from include/linux/kernfs.h:12,
> from include/linux/sysfs.h:16,
> from include/linux/kobject.h:20,
> from include/linux/cdev.h:5,
> from drivers/watchdog/watchdog_dev.c:31:
> drivers/watchdog/watchdog_dev.c: In function 'nowayout_store':
>>> arch/ia64/include/asm/current.h:16:19: error: expected identifier or '(' before 'struct'
> #define current ((struct task_struct *) ia64_getreg(_IA64_REG_TP))
> ^
> drivers/watchdog/watchdog_dev.c:460:22: note: in expansion of macro 'current'
> unsigned int value, current;
> ^~~~~~~

:facecpalm:

And it happened to work just fine in my test because I was targeting
ppc32 where unlike most other arches, current is not a macro but a
(more-or-less) ordinary global declaration

register struct task_struct *current asm ("r2");

Oh well, already fixed in v2 which dropped current for other reasons.

Rasmus