Re: [PATCH POC 2/4] printk: Do not block cont buffer by partially flushed lines

From: kbuild test robot
Date: Fri Jul 15 2016 - 18:09:24 EST


Hi,

[auto build test WARNING on v4.7-rc7]
[cannot apply to next-20160715]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Petr-Mladek/printk-Several-fixes-of-cont-buffer-and-console-handling/20160716-012724
config: ia64-allnoconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 4.9.0
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=ia64

All warnings (new ones prefixed by >>):

kernel/printk/printk.c: In function 'console_cont_flush':
kernel/printk/printk.c:2150:11: error: 'struct cont' has no member named 'msg'
if (!cont.msg->text_len)
^
>> kernel/printk/printk.c:2160:8: warning: passing argument 1 of 'cont_print_text' from incompatible pointer type
len = cont_print_text(&cont, text, size);
^
kernel/printk/printk.c:1873:15: note: expected 'char *' but argument is of type 'struct cont *'
static size_t cont_print_text(char *text, size_t size) { return 0; }
^
kernel/printk/printk.c:2160:8: warning: passing argument 2 of 'cont_print_text' makes integer from pointer without a cast
len = cont_print_text(&cont, text, size);
^
kernel/printk/printk.c:1873:15: note: expected 'size_t' but argument is of type 'char *'
static size_t cont_print_text(char *text, size_t size) { return 0; }
^
kernel/printk/printk.c:2160:8: error: too many arguments to function 'cont_print_text'
len = cont_print_text(&cont, text, size);
^
kernel/printk/printk.c:1873:15: note: declared here
static size_t cont_print_text(char *text, size_t size) { return 0; }
^
kernel/printk/printk.c:2163:27: error: 'struct cont' has no member named 'msg'
call_console_drivers(cont.msg->level, NULL, 0, text, len);
^
kernel/printk/printk.c: In function 'console_unlock':
kernel/printk/printk.c:2262:7: error: 'cont_console_len' undeclared (first use in this function)
if (cont_console_len && cont_console_seq == console_seq) {
^
kernel/printk/printk.c:2262:7: note: each undeclared identifier is reported only once for each function it appears in
kernel/printk/printk.c:2262:27: error: 'cont_console_seq' undeclared (first use in this function)
if (cont_console_len && cont_console_seq == console_seq) {
^
kernel/printk/printk.c:2265:13: error: 'struct cont' has no member named 'owner'
fake_cont.owner = NULL;
^
kernel/printk/printk.c:2266:13: error: 'struct cont' has no member named 'msg'
fake_cont.msg = msg;
^
kernel/printk/printk.c:2267:13: error: 'struct cont' has no member named 'buf'
fake_cont.buf = log_text(msg);
^
kernel/printk/printk.c:2269:11: warning: passing argument 1 of 'cont_print_text' from incompatible pointer type
len += cont_print_text(&fake_cont, text + len, sizeof(text) - len);
^
kernel/printk/printk.c:1873:15: note: expected 'char *' but argument is of type 'struct cont *'
static size_t cont_print_text(char *text, size_t size) { return 0; }
^
kernel/printk/printk.c:2269:11: warning: passing argument 2 of 'cont_print_text' makes integer from pointer without a cast
len += cont_print_text(&fake_cont, text + len, sizeof(text) - len);
^
kernel/printk/printk.c:1873:15: note: expected 'size_t' but argument is of type 'char *'
static size_t cont_print_text(char *text, size_t size) { return 0; }
^
kernel/printk/printk.c:2269:11: error: too many arguments to function 'cont_print_text'
len += cont_print_text(&fake_cont, text + len, sizeof(text) - len);
^
kernel/printk/printk.c:1873:15: note: declared here
static size_t cont_print_text(char *text, size_t size) { return 0; }
^

vim +/cont_print_text +2160 kernel/printk/printk.c

2144 {
2145 unsigned long flags;
2146 size_t len;
2147
2148 raw_spin_lock_irqsave(&logbuf_lock, flags);
2149
> 2150 if (!cont.msg->text_len)
2151 goto out;
2152
2153 /*
2154 * If the partially printed line is already stored in
2155 * the ring buffer, it will be handled with the other lines.
2156 */
2157 if (console_seq < log_next_seq)
2158 goto out;
2159
> 2160 len = cont_print_text(&cont, text, size);
2161 raw_spin_unlock(&logbuf_lock);
2162 stop_critical_timings();
2163 call_console_drivers(cont.msg->level, NULL, 0, text, len);

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

Attachment: .config.gz
Description: Binary data