This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit e74f287f7a122502cfdceffa6727a3c837359edf
Author: ouyangxiangzhen <[email protected]>
AuthorDate: Wed Nov 18 19:55:00 2026 +0800

    nxterm: use irqstate_t for irqsave flags
    
    spin_lock_irqsave_nopreempt() returns irqstate_t (the interrupt-mask
    flags), not a spinlock.  nxterm_kbdin.c had already used irqstate_t
    correctly in the poll path; the other path declared spinlock_t and broke
    as soon as spinlock_t became a struct under CONFIG_SPINLOCK_DEBUG.
    Declare irqstate_t so the saved flags round-trip through
    spin_unlock_irqrestore_nopreempt() with the correct type.
    
    This is a series-original fix: the underlying mismatch is an upstream
    latent bug that was hidden while spinlock_t was a scalar type.
    
    Assisted-By: mimo-v2.6-pro
    
    Signed-off-by: ouyangxiangzhen <[email protected]>
---
 graphics/nxterm/nxterm_kbdin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/graphics/nxterm/nxterm_kbdin.c b/graphics/nxterm/nxterm_kbdin.c
index 3704bd5c47f..d7757ab2550 100644
--- a/graphics/nxterm/nxterm_kbdin.c
+++ b/graphics/nxterm/nxterm_kbdin.c
@@ -225,7 +225,7 @@ int nxterm_poll(FAR struct file *filep, FAR struct pollfd_s 
*fds, bool setup)
   FAR struct inode *inode = filep->f_inode;
   FAR struct nxterm_state_s *priv;
   pollevent_t eventset;
-  spinlock_t flags;
+  irqstate_t flags;
   int ret;
   int i;
 

Reply via email to