* [rt-devel:linux-5.16.y-rt-rebase 8/132] kernel/printk/printk.c:2628:2: error: implicit declaration of function 'boot_delay_msec'
@ 2022-01-22 1:54 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-01-22 1:54 UTC (permalink / raw)
To: John Ogness; +Cc: llvm, kbuild-all, linux-kernel, Sebastian Andrzej Siewior
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.16.y-rt-rebase
head: 1722f531f5244c70dcd9687c40729860bb254e8d
commit: 75ade2af49f22287257530b6ba838efe2b6dfb56 [8/132] printk: refactor and rework printing logic
config: hexagon-buildonly-randconfig-r005-20220121 (https://download.01.org/0day-ci/archive/20220122/202201220904.ZcTeNwWl-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 7b3d30728816403d1fd73cc5082e9fb761262bce)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?id=75ade2af49f22287257530b6ba838efe2b6dfb56
git remote add rt-devel https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
git fetch --no-tags rt-devel linux-5.16.y-rt-rebase
git checkout 75ade2af49f22287257530b6ba838efe2b6dfb56
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash kernel/printk/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
kernel/printk/printk.c:175:5: warning: no previous prototype for function 'devkmsg_sysctl_set_loglvl' [-Wmissing-prototypes]
int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write,
^
kernel/printk/printk.c:175:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write,
^
static
>> kernel/printk/printk.c:2628:2: error: implicit declaration of function 'boot_delay_msec' [-Werror,-Wimplicit-function-declaration]
boot_delay_msec(r.info->level);
^
>> kernel/printk/printk.c:2629:2: error: implicit declaration of function 'printk_delay' [-Werror,-Wimplicit-function-declaration]
printk_delay();
^
1 warning and 2 errors generated.
vim +/boot_delay_msec +2628 kernel/printk/printk.c
2556
2557 /*
2558 * Print one record for the given console. The record printed is whatever
2559 * record is the next available record for the given console.
2560 *
2561 * Requires the console_lock.
2562 *
2563 * Returns false if the given console has no next record to print, otherwise
2564 * true.
2565 *
2566 * @handover will be set to true if a printk waiter has taken over the
2567 * console_lock, in which case the caller is no longer holding the
2568 * console_lock.
2569 */
2570 static bool console_emit_next_record(struct console *con, bool *handover)
2571 {
2572 static char ext_text[CONSOLE_EXT_LOG_MAX];
2573 static char text[CONSOLE_LOG_MAX];
2574 struct printk_info info;
2575 struct printk_record r;
2576 unsigned long flags;
2577 char *write_text;
2578 size_t len;
2579
2580 prb_rec_init_rd(&r, &info, text, sizeof(text));
2581
2582 if (!prb_read_valid(prb, con->seq, &r))
2583 return false;
2584
2585 if (con->seq != r.info->seq) {
2586 con->dropped += r.info->seq - con->seq;
2587 con->seq = r.info->seq;
2588 }
2589
2590 /* Skip record that has level above the console loglevel. */
2591 if (suppress_message_printing(r.info->level)) {
2592 con->seq++;
2593 goto skip;
2594 }
2595
2596 if (con->flags & CON_EXTENDED) {
2597 write_text = &ext_text[0];
2598 len = info_print_ext_header(ext_text, sizeof(ext_text), r.info);
2599 len += msg_print_ext_body(ext_text + len, sizeof(ext_text) - len,
2600 &r.text_buf[0], r.info->text_len, &r.info->dev_info);
2601 } else {
2602 write_text = &text[0];
2603 len = record_print_text(&r, console_msg_format & MSG_FORMAT_SYSLOG, printk_time);
2604 }
2605
2606 /*
2607 * While actively printing out messages, if another printk()
2608 * were to occur on another CPU, it may wait for this one to
2609 * finish. This task can not be preempted if there is a
2610 * waiter waiting to take over.
2611 *
2612 * Interrupts are disabled because the hand over to a waiter
2613 * must not be interrupted until the hand over is completed
2614 * (@console_waiter is cleared).
2615 */
2616 printk_safe_enter_irqsave(flags);
2617 console_lock_spinning_enable();
2618
2619 stop_critical_timings(); /* don't trace print latency */
2620 call_console_driver(con, write_text, len);
2621 start_critical_timings();
2622
2623 con->seq++;
2624
2625 *handover = console_lock_spinning_disable_and_check();
2626 printk_safe_exit_irqrestore(flags);
2627
> 2628 boot_delay_msec(r.info->level);
> 2629 printk_delay();
2630 skip:
2631 return true;
2632 }
2633
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* [rt-devel:linux-5.16.y-rt-rebase 8/132] kernel/printk/printk.c:2628:2: error: implicit declaration of function 'boot_delay_msec'
@ 2022-01-22 1:13 kernel test robot
2022-01-26 12:42 ` Sebastian Andrzej Siewior
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-01-22 1:13 UTC (permalink / raw)
To: John Ogness; +Cc: kbuild-all, linux-kernel, Sebastian Andrzej Siewior
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.16.y-rt-rebase
head: 1722f531f5244c70dcd9687c40729860bb254e8d
commit: 75ade2af49f22287257530b6ba838efe2b6dfb56 [8/132] printk: refactor and rework printing logic
config: i386-tinyconfig (https://download.01.org/0day-ci/archive/20220122/202201220950.sysXbxm5-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?id=75ade2af49f22287257530b6ba838efe2b6dfb56
git remote add rt-devel https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
git fetch --no-tags rt-devel linux-5.16.y-rt-rebase
git checkout 75ade2af49f22287257530b6ba838efe2b6dfb56
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash kernel/printk/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
kernel/printk/printk.c:175:5: warning: no previous prototype for 'devkmsg_sysctl_set_loglvl' [-Wmissing-prototypes]
175 | int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
kernel/printk/printk.c: In function 'console_emit_next_record':
>> kernel/printk/printk.c:2628:2: error: implicit declaration of function 'boot_delay_msec' [-Werror=implicit-function-declaration]
2628 | boot_delay_msec(r.info->level);
| ^~~~~~~~~~~~~~~
>> kernel/printk/printk.c:2629:2: error: implicit declaration of function 'printk_delay'; did you mean 'print_dev_t'? [-Werror=implicit-function-declaration]
2629 | printk_delay();
| ^~~~~~~~~~~~
| print_dev_t
cc1: some warnings being treated as errors
vim +/boot_delay_msec +2628 kernel/printk/printk.c
2556
2557 /*
2558 * Print one record for the given console. The record printed is whatever
2559 * record is the next available record for the given console.
2560 *
2561 * Requires the console_lock.
2562 *
2563 * Returns false if the given console has no next record to print, otherwise
2564 * true.
2565 *
2566 * @handover will be set to true if a printk waiter has taken over the
2567 * console_lock, in which case the caller is no longer holding the
2568 * console_lock.
2569 */
2570 static bool console_emit_next_record(struct console *con, bool *handover)
2571 {
2572 static char ext_text[CONSOLE_EXT_LOG_MAX];
2573 static char text[CONSOLE_LOG_MAX];
2574 struct printk_info info;
2575 struct printk_record r;
2576 unsigned long flags;
2577 char *write_text;
2578 size_t len;
2579
2580 prb_rec_init_rd(&r, &info, text, sizeof(text));
2581
2582 if (!prb_read_valid(prb, con->seq, &r))
2583 return false;
2584
2585 if (con->seq != r.info->seq) {
2586 con->dropped += r.info->seq - con->seq;
2587 con->seq = r.info->seq;
2588 }
2589
2590 /* Skip record that has level above the console loglevel. */
2591 if (suppress_message_printing(r.info->level)) {
2592 con->seq++;
2593 goto skip;
2594 }
2595
2596 if (con->flags & CON_EXTENDED) {
2597 write_text = &ext_text[0];
2598 len = info_print_ext_header(ext_text, sizeof(ext_text), r.info);
2599 len += msg_print_ext_body(ext_text + len, sizeof(ext_text) - len,
2600 &r.text_buf[0], r.info->text_len, &r.info->dev_info);
2601 } else {
2602 write_text = &text[0];
2603 len = record_print_text(&r, console_msg_format & MSG_FORMAT_SYSLOG, printk_time);
2604 }
2605
2606 /*
2607 * While actively printing out messages, if another printk()
2608 * were to occur on another CPU, it may wait for this one to
2609 * finish. This task can not be preempted if there is a
2610 * waiter waiting to take over.
2611 *
2612 * Interrupts are disabled because the hand over to a waiter
2613 * must not be interrupted until the hand over is completed
2614 * (@console_waiter is cleared).
2615 */
2616 printk_safe_enter_irqsave(flags);
2617 console_lock_spinning_enable();
2618
2619 stop_critical_timings(); /* don't trace print latency */
2620 call_console_driver(con, write_text, len);
2621 start_critical_timings();
2622
2623 con->seq++;
2624
2625 *handover = console_lock_spinning_disable_and_check();
2626 printk_safe_exit_irqrestore(flags);
2627
> 2628 boot_delay_msec(r.info->level);
> 2629 printk_delay();
2630 skip:
2631 return true;
2632 }
2633
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [rt-devel:linux-5.16.y-rt-rebase 8/132] kernel/printk/printk.c:2628:2: error: implicit declaration of function 'boot_delay_msec'
2022-01-22 1:13 kernel test robot
@ 2022-01-26 12:42 ` Sebastian Andrzej Siewior
0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2022-01-26 12:42 UTC (permalink / raw)
To: kernel test robot; +Cc: John Ogness, kbuild-all, linux-kernel
On 2022-01-22 09:13:20 [+0800], kernel test robot wrote:
…
> kernel/printk/printk.c: In function 'console_emit_next_record':
> >> kernel/printk/printk.c:2628:2: error: implicit declaration of function 'boot_delay_msec' [-Werror=implicit-function-declaration]
> 2628 | boot_delay_msec(r.info->level);
> | ^~~~~~~~~~~~~~~
> >> kernel/printk/printk.c:2629:2: error: implicit declaration of function 'printk_delay'; did you mean 'print_dev_t'? [-Werror=implicit-function-declaration]
> 2629 | printk_delay();
> | ^~~~~~~~~~~~
> | print_dev_t
> cc1: some warnings being treated as errors
I'm going to fold this in:
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 60c351afe7aa0..ae0cccf66b3cb 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2265,6 +2265,8 @@ static void console_lock_spinning_enable(void) { }
static int console_lock_spinning_disable_and_check(void) { return 0; }
static void call_console_driver(struct console *con, const char *text, size_t len) {}
static bool suppress_message_printing(int level) { return false; }
+static inline void boot_delay_msec(int level) { }
+static inline void printk_delay(void) { }
#endif /* CONFIG_PRINTK */
Sebastian
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-26 12:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-22 1:54 [rt-devel:linux-5.16.y-rt-rebase 8/132] kernel/printk/printk.c:2628:2: error: implicit declaration of function 'boot_delay_msec' kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2022-01-22 1:13 kernel test robot
2022-01-26 12:42 ` Sebastian Andrzej Siewior
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).