From: kernel test robot <lkp@intel.com>
To: John Ogness <john.ogness@linutronix.de>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH next v1 1/2] serial: 8250: Switch to nbcon console
Date: Sun, 8 Sep 2024 03:55:01 +0800 [thread overview]
Message-ID: <202409080329.h0HqFuzd-lkp@intel.com> (raw)
In-Reply-To: <20240905134719.142554-2-john.ogness@linutronix.de>
Hi John,
kernel test robot noticed the following build errors:
[auto build test ERROR on f1ec92a066b2608e7c971dfce28ebe2d2cdb056e]
url: https://github.com/intel-lab-lkp/linux/commits/John-Ogness/serial-8250-Switch-to-nbcon-console/20240905-214915
base: f1ec92a066b2608e7c971dfce28ebe2d2cdb056e
patch link: https://lore.kernel.org/r/20240905134719.142554-2-john.ogness%40linutronix.de
patch subject: [PATCH next v1 1/2] serial: 8250: Switch to nbcon console
config: x86_64-randconfig-015-20240907 (https://download.01.org/0day-ci/archive/20240908/202409080329.h0HqFuzd-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240908/202409080329.h0HqFuzd-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/202409080329.h0HqFuzd-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/tty/serial/8250/8250_core.c:420:2: error: call to undeclared function '__uart_port_lock_irqsave'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
420 | __uart_port_lock_irqsave(up, flags);
| ^
drivers/tty/serial/8250/8250_core.c:420:2: note: did you mean 'uart_port_lock_irqsave'?
include/linux/serial_core.h:616:20: note: 'uart_port_lock_irqsave' declared here
616 | static inline void uart_port_lock_irqsave(struct uart_port *up, unsigned long *flags)
| ^
>> drivers/tty/serial/8250/8250_core.c:427:2: error: call to undeclared function '__uart_port_unlock_irqrestore'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
427 | __uart_port_unlock_irqrestore(up, flags);
| ^
drivers/tty/serial/8250/8250_core.c:427:2: note: did you mean 'uart_port_unlock_irqrestore'?
include/linux/serial_core.h:667:20: note: 'uart_port_unlock_irqrestore' declared here
667 | static inline void uart_port_unlock_irqrestore(struct uart_port *up, unsigned long flags)
| ^
>> drivers/tty/serial/8250/8250_core.c:533:18: error: incompatible function pointer types initializing 'bool (*)(struct console *, struct nbcon_write_context *)' (aka '_Bool (*)(struct console *, struct nbcon_write_context *)') with an expression of type 'void (struct console *, struct nbcon_write_context *)' [-Wincompatible-function-pointer-types]
533 | .write_atomic = univ8250_console_write_atomic,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/tty/serial/8250/8250_core.c:534:3: error: field designator 'write_thread' does not refer to any field in type 'struct console'
534 | .write_thread = univ8250_console_write_thread,
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/tty/serial/8250/8250_core.c:535:3: error: field designator 'device_lock' does not refer to any field in type 'struct console'
535 | .device_lock = univ8250_console_device_lock,
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/tty/serial/8250/8250_core.c:536:3: error: field designator 'device_unlock' does not refer to any field in type 'struct console'
536 | .device_unlock = univ8250_console_device_unlock,
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 errors generated.
--
>> drivers/tty/serial/8250/8250_port.c:3502:3: error: call to undeclared function 'nbcon_reacquire_nobuf'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
3502 | nbcon_reacquire_nobuf(wctxt);
| ^
1 error generated.
vim +/__uart_port_lock_irqsave +420 drivers/tty/serial/8250/8250_core.c
415
416 static void univ8250_console_device_lock(struct console *con, unsigned long *flags)
417 {
418 struct uart_port *up = &serial8250_ports[con->index].port;
419
> 420 __uart_port_lock_irqsave(up, flags);
421 }
422
423 static void univ8250_console_device_unlock(struct console *con, unsigned long flags)
424 {
425 struct uart_port *up = &serial8250_ports[con->index].port;
426
> 427 __uart_port_unlock_irqrestore(up, flags);
428 }
429 #endif /* USE_SERIAL_8250_LEGACY_CONSOLE */
430
431 static int univ8250_console_setup(struct console *co, char *options)
432 {
433 struct uart_8250_port *up;
434 struct uart_port *port;
435 int retval, i;
436
437 /*
438 * Check whether an invalid uart number has been specified, and
439 * if so, search for the first available port that does have
440 * console support.
441 */
442 if (co->index < 0 || co->index >= UART_NR)
443 co->index = 0;
444
445 /*
446 * If the console is past the initial isa ports, init more ports up to
447 * co->index as needed and increment nr_uarts accordingly.
448 */
449 for (i = nr_uarts; i <= co->index; i++) {
450 up = serial8250_setup_port(i);
451 if (!up)
452 return -ENODEV;
453 nr_uarts++;
454 }
455
456 port = &serial8250_ports[co->index].port;
457 /* link port to console */
458 port->cons = co;
459
460 retval = serial8250_console_setup(port, options, false);
461 if (retval != 0)
462 port->cons = NULL;
463 return retval;
464 }
465
466 static int univ8250_console_exit(struct console *co)
467 {
468 struct uart_port *port;
469
470 port = &serial8250_ports[co->index].port;
471 return serial8250_console_exit(port);
472 }
473
474 /**
475 * univ8250_console_match - non-standard console matching
476 * @co: registering console
477 * @name: name from console command line
478 * @idx: index from console command line
479 * @options: ptr to option string from console command line
480 *
481 * Only attempts to match console command lines of the form:
482 * console=uart[8250],io|mmio|mmio16|mmio32,<addr>[,<options>]
483 * console=uart[8250],0x<addr>[,<options>]
484 * This form is used to register an initial earlycon boot console and
485 * replace it with the serial8250_console at 8250 driver init.
486 *
487 * Performs console setup for a match (as required by interface)
488 * If no <options> are specified, then assume the h/w is already setup.
489 *
490 * Returns 0 if console matches; otherwise non-zero to use default matching
491 */
492 static int univ8250_console_match(struct console *co, char *name, int idx,
493 char *options)
494 {
495 char match[] = "uart"; /* 8250-specific earlycon name */
496 unsigned char iotype;
497 resource_size_t addr;
498 int i;
499
500 if (strncmp(name, match, 4) != 0)
501 return -ENODEV;
502
503 if (uart_parse_earlycon(options, &iotype, &addr, &options))
504 return -ENODEV;
505
506 /* try to match the port specified on the command line */
507 for (i = 0; i < nr_uarts; i++) {
508 struct uart_port *port = &serial8250_ports[i].port;
509
510 if (port->iotype != iotype)
511 continue;
512 if ((iotype == UPIO_MEM || iotype == UPIO_MEM16 ||
513 iotype == UPIO_MEM32 || iotype == UPIO_MEM32BE)
514 && (port->mapbase != addr))
515 continue;
516 if (iotype == UPIO_PORT && port->iobase != addr)
517 continue;
518
519 co->index = i;
520 port->cons = co;
521 return serial8250_console_setup(port, options, true);
522 }
523
524 return -ENODEV;
525 }
526
527 static struct console univ8250_console = {
528 .name = "ttyS",
529 #ifdef USE_SERIAL_8250_LEGACY_CONSOLE
530 .write = univ8250_console_write,
531 .flags = CON_PRINTBUFFER | CON_ANYTIME,
532 #else
> 533 .write_atomic = univ8250_console_write_atomic,
> 534 .write_thread = univ8250_console_write_thread,
> 535 .device_lock = univ8250_console_device_lock,
> 536 .device_unlock = univ8250_console_device_unlock,
537 .flags = CON_PRINTBUFFER | CON_ANYTIME | CON_NBCON,
538 #endif
539 .device = uart_console_device,
540 .setup = univ8250_console_setup,
541 .exit = univ8250_console_exit,
542 .match = univ8250_console_match,
543 .index = -1,
544 .data = &serial8250_reg,
545 };
546
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-09-07 19:55 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-05 13:47 [PATCH tty-next v1 0/2] convert 8250 to nbcon John Ogness
2024-09-05 13:47 ` [PATCH next v1 1/2] serial: 8250: Switch to nbcon console John Ogness
2024-09-05 14:15 ` Andy Shevchenko
2024-09-05 19:23 ` John Ogness
2024-09-05 19:30 ` Andy Shevchenko
2024-09-06 10:10 ` Greg Kroah-Hartman
2024-09-06 12:37 ` Petr Mladek
2024-09-06 13:35 ` John Ogness
2024-09-06 16:38 ` John Ogness
2024-09-07 20:39 ` Thomas Gleixner
2024-09-09 9:53 ` Andy Shevchenko
2024-09-09 12:13 ` Thomas Gleixner
2024-09-09 9:50 ` Andy Shevchenko
2024-09-07 19:55 ` kernel test robot [this message]
2024-09-08 1:45 ` kernel test robot
2024-09-08 6:26 ` kernel test robot
2024-09-05 13:47 ` [PATCH next v1 2/2] serial: 8250: Revert "drop lockdep annotation from serial8250_clear_IER()" John Ogness
2024-09-05 13:53 ` [PATCH tty-next v1 0/2] convert 8250 to nbcon Andy Shevchenko
2024-09-05 14:05 ` John Ogness
2024-09-05 14:09 ` Greg Kroah-Hartman
2024-09-05 14:12 ` John Ogness
2024-09-05 14:17 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202409080329.h0HqFuzd-lkp@intel.com \
--to=lkp@intel.com \
--cc=john.ogness@linutronix.de \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.