Re: [RFC v3 1/9] printk: extract kmsg-related routines from printk.c to kmsg.c

From: kbuild test robot
Date: Mon Oct 19 2015 - 10:00:40 EST


Hi Paul,

[auto build test ERROR on next-20151016 -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

url: https://github.com/0day-ci/linux/commits/Paul-Osmialowski/Additional-kmsg-devices/20151019-211509
config: i386-defconfig (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All error/warnings (new ones prefixed by >>):

In file included from include/linux/fs.h:5:0,
from kernel/printk/kmsg.c:5:
kernel/printk/kmsg.c: In function 'devkmsg_read':
include/linux/wait.h:400:31: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
___wait_event(wq, condition, TASK_INTERRUPTIBLE, 0, 0, \
^
include/linux/wait.h:225:52: note: in definition of macro '___wait_event'
long __int = prepare_to_wait_event(&wq, &__wait, state);\
^
>> include/linux/wait.h:423:11: note: in expansion of macro '__wait_event_interruptible'
__ret = __wait_event_interruptible(wq, condition); \
^
>> kernel/printk/kmsg.c:105:9: note: in expansion of macro 'wait_event_interruptible'
ret = wait_event_interruptible(log_wait,
^
include/linux/wait.h:400:31: note: each undeclared identifier is reported only once for each function it appears in
___wait_event(wq, condition, TASK_INTERRUPTIBLE, 0, 0, \
^
include/linux/wait.h:225:52: note: in definition of macro '___wait_event'
long __int = prepare_to_wait_event(&wq, &__wait, state);\
^
>> include/linux/wait.h:423:11: note: in expansion of macro '__wait_event_interruptible'
__ret = __wait_event_interruptible(wq, condition); \
^
>> kernel/printk/kmsg.c:105:9: note: in expansion of macro 'wait_event_interruptible'
ret = wait_event_interruptible(log_wait,
^
include/linux/wait.h:198:43: error: 'TASK_KILLABLE' undeclared (first use in this function)
state == TASK_INTERRUPTIBLE || state == TASK_KILLABLE) \
^
include/linux/wait.h:230:7: note: in expansion of macro '___wait_is_interruptible'
if (___wait_is_interruptible(state) && __int) { \
^
include/linux/wait.h:400:2: note: in expansion of macro '___wait_event'
___wait_event(wq, condition, TASK_INTERRUPTIBLE, 0, 0, \
^
>> include/linux/wait.h:423:11: note: in expansion of macro '__wait_event_interruptible'
__ret = __wait_event_interruptible(wq, condition); \
^
>> kernel/printk/kmsg.c:105:9: note: in expansion of macro 'wait_event_interruptible'
ret = wait_event_interruptible(log_wait,
^
>> include/linux/wait.h:401:9: error: implicit declaration of function 'schedule' [-Werror=implicit-function-declaration]
schedule())
^
include/linux/wait.h:240:3: note: in definition of macro '___wait_event'
cmd; \
^
>> include/linux/wait.h:423:11: note: in expansion of macro '__wait_event_interruptible'
__ret = __wait_event_interruptible(wq, condition); \
^
>> kernel/printk/kmsg.c:105:9: note: in expansion of macro 'wait_event_interruptible'
ret = wait_event_interruptible(log_wait,
^
cc1: some warnings being treated as errors

vim +/schedule +401 include/linux/wait.h

82e06c81 Shaohua Li 2013-11-14 394 if (condition) \
82e06c81 Shaohua Li 2013-11-14 395 break; \
82e06c81 Shaohua Li 2013-11-14 396 __wait_event_cmd(wq, condition, cmd1, cmd2); \
82e06c81 Shaohua Li 2013-11-14 397 } while (0)
82e06c81 Shaohua Li 2013-11-14 398
35a2af94 Peter Zijlstra 2013-10-02 399 #define __wait_event_interruptible(wq, condition) \
35a2af94 Peter Zijlstra 2013-10-02 @400 ___wait_event(wq, condition, TASK_INTERRUPTIBLE, 0, 0, \
f13f4c41 Peter Zijlstra 2013-10-02 @401 schedule())
^1da177e Linus Torvalds 2005-04-16 402
^1da177e Linus Torvalds 2005-04-16 403 /**
^1da177e Linus Torvalds 2005-04-16 404 * wait_event_interruptible - sleep until a condition gets true
^1da177e Linus Torvalds 2005-04-16 405 * @wq: the waitqueue to wait on
^1da177e Linus Torvalds 2005-04-16 406 * @condition: a C expression for the event to wait for
^1da177e Linus Torvalds 2005-04-16 407 *
^1da177e Linus Torvalds 2005-04-16 408 * The process is put to sleep (TASK_INTERRUPTIBLE) until the
^1da177e Linus Torvalds 2005-04-16 409 * @condition evaluates to true or a signal is received.
^1da177e Linus Torvalds 2005-04-16 410 * The @condition is checked each time the waitqueue @wq is woken up.
^1da177e Linus Torvalds 2005-04-16 411 *
^1da177e Linus Torvalds 2005-04-16 412 * wake_up() has to be called after changing any variable that could
^1da177e Linus Torvalds 2005-04-16 413 * change the result of the wait condition.
^1da177e Linus Torvalds 2005-04-16 414 *
^1da177e Linus Torvalds 2005-04-16 415 * The function will return -ERESTARTSYS if it was interrupted by a
^1da177e Linus Torvalds 2005-04-16 416 * signal and 0 if @condition evaluated to true.
^1da177e Linus Torvalds 2005-04-16 417 */
^1da177e Linus Torvalds 2005-04-16 418 #define wait_event_interruptible(wq, condition) \
^1da177e Linus Torvalds 2005-04-16 419 ({ \
^1da177e Linus Torvalds 2005-04-16 420 int __ret = 0; \
e22b886a Peter Zijlstra 2014-09-24 421 might_sleep(); \
^1da177e Linus Torvalds 2005-04-16 422 if (!(condition)) \
35a2af94 Peter Zijlstra 2013-10-02 @423 __ret = __wait_event_interruptible(wq, condition); \
^1da177e Linus Torvalds 2005-04-16 424 __ret; \
^1da177e Linus Torvalds 2005-04-16 425 })
^1da177e Linus Torvalds 2005-04-16 426

:::::: The code at line 401 was first introduced by commit
:::::: f13f4c41c9cf9cd61c896e46e4e7ba2687e2af9c sched/wait: Collapse __wait_event_interruptible()

:::::: TO: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
:::::: CC: Ingo Molnar <mingo@xxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data