From: kernel test robot <lkp@intel.com>
To: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: drivers/tty/serial/8250/8250_port.c:2572:2: error: use of undeclared identifier 'class_tty_port_tty_t'
Date: Tue, 30 Jun 2026 06:54:12 +0800 [thread overview]
Message-ID: <202606300621.6Sh8WrAx-lkp@intel.com> (raw)
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
reply other threads:[~2026-06-29 22:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202606300621.6Sh8WrAx-lkp@intel.com \
--to=lkp@intel.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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.