* drivers/tty/serial/8250/8250_port.c:2572:2: error: use of undeclared identifier 'class_tty_port_tty_t'
@ 2026-06-29 22:54 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-06-29 22:54 UTC (permalink / raw)
To: Jiri Slaby (SUSE); +Cc: oe-kbuild-all, linux-kernel
Hi Jiri,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dc59e4fea9d83f03bad6bddf3fa2e52491777482
commit: b339809edda15939e7d46b429c420c2bfe4ad946 serial: 8250: use guard()s
date: 11 months ago
config: mips-randconfig-r073-20260629 (https://download.01.org/0day-ci/archive/20260630/202606300621.6Sh8WrAx-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
smatch: v0.5.0-9185-gbcc58b9c
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260630/202606300621.6Sh8WrAx-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
| Fixes: b339809edda1 ("serial: 8250: use guard()s")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606300621.6Sh8WrAx-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/tty/serial/8250/8250_port.c:2572:2: error: use of undeclared identifier 'class_tty_port_tty_t'
2572 | scoped_guard(tty_port_tty, tport) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/cleanup.h:429:2: note: expanded from macro 'scoped_guard'
429 | __scoped_guard(_name, __UNIQUE_ID(label), args)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/cleanup.h:420:7: note: expanded from macro '__scoped_guard'
420 | for (CLASS(_name, scope)(args); \
| ^~~~~~~~~~~~~~~~~~~
include/linux/cleanup.h:290:2: note: expanded from macro 'CLASS'
290 | class_##_name##_t var __cleanup(class_##_name##_destructor) = \
| ^~~~~~~~~~~~~~~~~
<scratch space>:81:1: note: expanded from here
81 | class_tty_port_tty_t
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/tty/serial/8250/8250_port.c:2572:2: error: call to undeclared function 'class_tty_port_tty_lock_ptr'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
include/linux/cleanup.h:429:2: note: expanded from macro 'scoped_guard'
429 | __scoped_guard(_name, __UNIQUE_ID(label), args)
| ^
include/linux/cleanup.h:421:7: note: expanded from macro '__scoped_guard'
421 | __guard_ptr(_name)(&scope) || !__is_cond_ptr(_name); \
| ^
include/linux/cleanup.h:403:28: note: expanded from macro '__guard_ptr'
403 | #define __guard_ptr(_name) class_##_name##_lock_ptr
| ^
<scratch space>:87:1: note: expanded from here
87 | class_tty_port_tty_lock_ptr
| ^
>> drivers/tty/serial/8250/8250_port.c:2572:2: error: use of undeclared identifier 'scope'
2572 | scoped_guard(tty_port_tty, tport) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/cleanup.h:429:2: note: expanded from macro 'scoped_guard'
429 | __scoped_guard(_name, __UNIQUE_ID(label), args)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/cleanup.h:421:27: note: expanded from macro '__scoped_guard'
421 | __guard_ptr(_name)(&scope) || !__is_cond_ptr(_name); \
| ^~~~~
>> drivers/tty/serial/8250/8250_port.c:2572:2: error: use of undeclared identifier 'class_tty_port_tty_is_conditional'
2572 | scoped_guard(tty_port_tty, tport) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/cleanup.h:429:2: note: expanded from macro 'scoped_guard'
429 | __scoped_guard(_name, __UNIQUE_ID(label), args)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/cleanup.h:421:38: note: expanded from macro '__scoped_guard'
421 | __guard_ptr(_name)(&scope) || !__is_cond_ptr(_name); \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/cleanup.h:405:30: note: expanded from macro '__is_cond_ptr'
405 | #define __is_cond_ptr(_name) class_##_name##_is_conditional
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:89:1: note: expanded from here
89 | class_tty_port_tty_is_conditional
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/tty/serial/8250/8250_port.c:2573:28: error: call to undeclared function 'scoped_tty'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
2573 | struct tty_struct *tty = scoped_tty();
| ^
drivers/tty/serial/8250/8250_port.c:2573:28: note: did you mean 'stop_tty'?
include/linux/tty.h:404:6: note: 'stop_tty' declared here
404 | void stop_tty(struct tty_struct *tty);
| ^
>> drivers/tty/serial/8250/8250_port.c:2573:22: error: incompatible integer to pointer conversion initializing 'struct tty_struct *' with an expression of type 'int' [-Wint-conversion]
2573 | struct tty_struct *tty = scoped_tty();
| ^ ~~~~~~~~~~~~
6 errors generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SERIAL_8250
Depends on [n]: TTY [=n] && HAS_IOMEM [=y] && !S390
Selected by [y]:
- ECONET [=y]
WARNING: unmet direct dependencies detected for EARLY_PRINTK_8250
Depends on [n]: EARLY_PRINTK [=n] && USE_GENERIC_EARLY_PRINTK_8250 [=y]
Selected by [y]:
- ECONET [=y]
WARNING: unmet direct dependencies detected for SERIAL_OF_PLATFORM
Depends on [n]: TTY [=n] && HAS_IOMEM [=y] && SERIAL_8250 [=y] && OF [=y]
Selected by [y]:
- ECONET [=y]
vim +/class_tty_port_tty_t +2572 drivers/tty/serial/8250/8250_port.c
2562
2563 /*
2564 * Note in order to avoid the tty port mutex deadlock don't use the next method
2565 * within the uart port callbacks. Primarily it's supposed to be utilized to
2566 * handle a sudden reference clock rate change.
2567 */
2568 void serial8250_update_uartclk(struct uart_port *port, unsigned int uartclk)
2569 {
2570 struct tty_port *tport = &port->state->port;
2571
> 2572 scoped_guard(tty_port_tty, tport) {
> 2573 struct tty_struct *tty = scoped_tty();
2574
2575 guard(rwsem_write)(&tty->termios_rwsem);
2576 guard(mutex)(&tport->mutex);
2577
2578 if (port->uartclk == uartclk)
2579 return;
2580
2581 port->uartclk = uartclk;
2582
2583 if (!tty_port_initialized(tport))
2584 return;
2585
2586 serial8250_do_set_termios(port, &tty->termios, NULL);
2587
2588 return;
2589 }
2590 guard(mutex)(&tport->mutex);
2591 port->uartclk = uartclk;
2592 }
2593 EXPORT_SYMBOL_GPL(serial8250_update_uartclk);
2594
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-29 22:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-29 22:54 drivers/tty/serial/8250/8250_port.c:2572:2: error: use of undeclared identifier 'class_tty_port_tty_t' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox