mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "j.turek" <jakub.turek@elsta.tech>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: drivers/tty/serial/xilinx_uartps.c:438:25: sparse: sparse: dereference of noderef expression
Date: Mon, 15 Jun 2026 04:00:07 +0800	[thread overview]
Message-ID: <202606150318.PcLVQ18L-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8cd9520d35a6c38db6567e97dd93b1f11f185dc6
commit: 267ee93c417e685d9f8e079e41c70ba6ee4df5a5 serial: xilinx_uartps: fix rs485 delay_rts_after_send
date:   6 months ago
config: i386-randconfig-062-20260614 (https://download.01.org/0day-ci/archive/20260615/202606150318.PcLVQ18L-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260615/202606150318.PcLVQ18L-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: 267ee93c417e ("serial: xilinx_uartps: fix rs485 delay_rts_after_send")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606150318.PcLVQ18L-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/tty/serial/xilinx_uartps.c:438:25: sparse: sparse: dereference of noderef expression
   drivers/tty/serial/xilinx_uartps.c:709:13: sparse: sparse: context imbalance in 'cdns_uart_start_tx' - different lock contexts for basic block

vim +438 drivers/tty/serial/xilinx_uartps.c

   418	
   419	/**
   420	 * cdns_uart_handle_tx - Handle the bytes to be transmitted.
   421	 * @dev_id: Id of the UART port
   422	 * Return: None
   423	 */
   424	static void cdns_uart_handle_tx(void *dev_id)
   425	{
   426		struct uart_port *port = (struct uart_port *)dev_id;
   427		struct cdns_uart *cdns_uart = port->private_data;
   428		struct tty_port *tport = &port->state->port;
   429		unsigned int numbytes;
   430		unsigned char ch;
   431		ktime_t rts_delay;
   432	
   433		if (kfifo_is_empty(&tport->xmit_fifo) || uart_tx_stopped(port)) {
   434			/* Disable the TX Empty interrupt */
   435			writel(CDNS_UART_IXR_TXEMPTY, port->membase + CDNS_UART_IDR);
   436			/* Set RTS line after delay */
   437			if (cdns_uart->port->rs485.flags & SER_RS485_ENABLED) {
 > 438				cdns_uart->tx_timer.function = &cdns_rs485_rx_callback;
   439				rts_delay = ns_to_ktime(cdns_calc_after_tx_delay(cdns_uart));
   440				hrtimer_start(&cdns_uart->tx_timer, rts_delay, HRTIMER_MODE_REL);
   441			}
   442			return;
   443		}
   444	
   445		numbytes = port->fifosize;
   446		while (numbytes &&
   447		       !(readl(port->membase + CDNS_UART_SR) & CDNS_UART_SR_TXFULL) &&
   448		       uart_fifo_get(port, &ch)) {
   449			writel(ch, port->membase + CDNS_UART_FIFO);
   450			numbytes--;
   451		}
   452	
   453		if (kfifo_len(&tport->xmit_fifo) < WAKEUP_CHARS)
   454			uart_write_wakeup(port);
   455	
   456		/* Enable the TX Empty interrupt */
   457		writel(CDNS_UART_IXR_TXEMPTY, cdns_uart->port->membase + CDNS_UART_IER);
   458	}
   459	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-06-14 20:00 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=202606150318.PcLVQ18L-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jakub.turek@elsta.tech \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®