From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48C4B353EC0 for ; Sat, 8 Aug 2026 05:10:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786165835; cv=none; b=Iu0I15tRp+G+aDI0HS9cYMJ9g+GVjV7Ss6JWD2bc6rRgYB135zGDM2i8IDaJxKcgEkMUoJ7+5vjIf4+Try2QhUtF4XnZoS3ZkFMI/7pjYVMO0YFb3HVWThSwsxjEdd8Ff7yRTAPQ5zwGCw+EVtV7Nbhpu8SNUAPd4+BuGs1f6po= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786165835; c=relaxed/simple; bh=iGuTNRH3Pxq62Ajg+9o7DWO+yQS3oYAIrLZeIusV/rU=; h=Date:From:To:Cc:Subject:Message-ID; b=cuPKz0qF9aDmYfBS9s2IyCyIr+j0Ze3GFyPrD0u/vpKGJeCPEmnLAx8l7Yy1NzVyKyC60GjaMfT+U9g6kYmlfaFurHU5Jfyq4mqPyJ3bD9X+SMxnIfHaeT1/rWUAZnGKF+Z0L609SIOQ71NKYYogntBjEqNB50MMRE9uxnoPZKQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=fItD1N1U; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fItD1N1U" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1786165833; x=1817701833; h=date:from:to:cc:subject:message-id; bh=iGuTNRH3Pxq62Ajg+9o7DWO+yQS3oYAIrLZeIusV/rU=; b=fItD1N1UX0WuviMLWRkNPY6JwrUwFbkJ5QDovgJ7A3JOL+pot4V1Vm7B MgUTTyTpy4B+JA7QYdw7iHBjUUUB2eWbyAl1aTrlJwij+YXbHQYfwgjaj 5PePNFZazlIQo9TbrEUfsdaKQ7A8r4W6jz04cSDwrXvDs6pUl4BnCbaP1 X2kGL5a7HNOjeDF6nlDWTChFsulF6MnS6gLXZOC0jtCKjZjcfw0BXycdo NveNrcRnEUc0svYMt8YzxgqEC9e5cD4t64wA8HQZDfh8XNW7tKiY6t1Ch PaZeBd1S4W+ApsnAQOBMMsNIM2H/2t98tEsssJrj5+NwNiX0gDK3hLJoP g==; X-CSE-ConnectionGUID: m+Y0f6HBShiZEpk7vt17vQ== X-CSE-MsgGUID: s3twPKIyTa+TwxlWwC8sHQ== X-IronPort-AV: E=McAfee;i="6800,10657,11868"; a="86648695" X-IronPort-AV: E=Sophos;i="6.25,211,1779174000"; d="scan'208";a="86648695" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2026 22:10:33 -0700 X-CSE-ConnectionGUID: Vm5BMoeyRgS9kXHzfW4LTw== X-CSE-MsgGUID: Nvgz8Fy+Qdegn5rtCYQITQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,211,1779174000"; d="scan'208";a="259257681" Received: from lkp-server01.sh.intel.com (HELO 6eda058d650d) ([10.239.97.150]) by fmviesa007.fm.intel.com with ESMTP; 07 Aug 2026 22:10:31 -0700 Received: from kbuild by 6eda058d650d with local (Exim 4.98.2) (envelope-from ) id 1wsZKG-00000000JmK-46rt; Sat, 08 Aug 2026 05:10:28 +0000 Date: Sat, 08 Aug 2026 13:09:53 +0800 From: kernel test robot To: "Jiri Slaby (SUSE)" 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' Message-ID: <202608081221.JTg0gz0g-lkp@intel.com> User-Agent: s-nail v14.9.25 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Hi Jiri, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: bcc44b6785f216eb939226ade6e3910baa30516b commit: b339809edda15939e7d46b429c420c2bfe4ad946 serial: 8250: use guard()s date: 12 months ago config: mips-randconfig-r122-20260808 (https://download.01.org/0day-ci/archive/20260808/202608081221.JTg0gz0g-lkp@intel.com/config) compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90) sparse: v0.6.5-rc1 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260808/202608081221.JTg0gz0g-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 | Closes: https://lore.kernel.org/oe-kbuild-all/202608081221.JTg0gz0g-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) = \ | ^ :35:1: note: expanded from here 35 | 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 | ^ :41:1: note: expanded from here 41 | class_tty_port_tty_lock_ptr | ^ >> drivers/tty/serial/8250/8250_port.c:2572:2: error: use of undeclared identifier 'scope' 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' 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 | ^ :43:1: note: expanded from here 43 | 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 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