All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: drivers/tty/serial/cpm_uart.c:1533:5-20: WARNING: Unsigned expression compared with zero: pinfo -> port . irq < 0
Date: Sun, 04 Oct 2026 10:49:30 +0200	[thread overview]
Message-ID: <202610041027.gpXgSTFO-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Rosen Penev <rosenp@gmail.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6addb4f385570ebc11c4eb499a4f1c149f313e84
commit: 831603b3e8aa3892de229fda846b2f859c518699 serial: cpm_uart: replace irq_of_parse_and_map with platform_get_irq
date:   3 months ago
:::::: branch date: 4 hours ago
:::::: commit date: 3 months ago
config: powerpc-randconfig-r2105-20261004 (https://download.01.org/0day-ci/archive/20261004/202610041027.gpXgSTFO-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project d7e4505dd447d115d85fdea45cd71030ac1d86ee)

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: 831603b3e8aa ("serial: cpm_uart: replace irq_of_parse_and_map with platform_get_irq")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202610041027.gpXgSTFO-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/tty/serial/cpm_uart.c:1533:5-20: WARNING: Unsigned expression compared with zero: pinfo -> port . irq < 0

vim +1533 drivers/tty/serial/cpm_uart.c

7ae870368d198af drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2007-07-17  1515  
9671f09921d93e7 drivers/tty/serial/cpm_uart/cpm_uart_core.c Bill Pemberton   2012-11-19  1516  static int cpm_uart_probe(struct platform_device *ofdev)
7ae870368d198af drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2007-07-17  1517  {
7ae870368d198af drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2007-07-17  1518  	int index = probe_index++;
7ae870368d198af drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2007-07-17  1519  	struct uart_cpm_port *pinfo = &cpm_uart_ports[index];
7ae870368d198af drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2007-07-17  1520  	int ret;
7ae870368d198af drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2007-07-17  1521  
7ae870368d198af drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2007-07-17  1522  	pinfo->port.line = index;
7ae870368d198af drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2007-07-17  1523  
7ae870368d198af drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2007-07-17  1524  	if (index >= UART_NR)
7ae870368d198af drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2007-07-17  1525  		return -ENODEV;
7ae870368d198af drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2007-07-17  1526  
696faedd616e202 drivers/tty/serial/cpm_uart/cpm_uart_core.c Jingoo Han       2013-05-23  1527  	platform_set_drvdata(ofdev, pinfo);
7ae870368d198af drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2007-07-17  1528  
bd86ef378412fc3 drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2009-04-03  1529  	/* initialize the device pointer for the port */
bd86ef378412fc3 drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2009-04-03  1530  	pinfo->port.dev = &ofdev->dev;
bd86ef378412fc3 drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2009-04-03  1531  
831603b3e8aa389 drivers/tty/serial/cpm_uart.c               Rosen Penev      2026-06-06  1532  	pinfo->port.irq = platform_get_irq(ofdev, 0);
831603b3e8aa389 drivers/tty/serial/cpm_uart.c               Rosen Penev      2026-06-06 @1533  	if (pinfo->port.irq < 0)
831603b3e8aa389 drivers/tty/serial/cpm_uart.c               Rosen Penev      2026-06-06  1534  		return pinfo->port.irq;
7ae870368d198af drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2007-07-17  1535  
30963b2f75bfdbb drivers/tty/serial/cpm_uart/cpm_uart_core.c Christophe Leroy 2022-09-30  1536  	ret = cpm_uart_init_port(ofdev->dev.of_node, pinfo);
30963b2f75bfdbb drivers/tty/serial/cpm_uart/cpm_uart_core.c Christophe Leroy 2022-09-30  1537  	if (!ret)
7ae870368d198af drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2007-07-17  1538  		return uart_add_one_port(&cpm_reg, &pinfo->port);
30963b2f75bfdbb drivers/tty/serial/cpm_uart/cpm_uart_core.c Christophe Leroy 2022-09-30  1539  
30963b2f75bfdbb drivers/tty/serial/cpm_uart/cpm_uart_core.c Christophe Leroy 2022-09-30  1540  	return ret;
7ae870368d198af drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2007-07-17  1541  }
7ae870368d198af drivers/serial/cpm_uart/cpm_uart_core.c     Scott Wood       2007-07-17  1542  

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

                 reply	other threads:[~2026-10-04  8:49 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=202610041027.gpXgSTFO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=julia.lawall@inria.fr \
    --cc=oe-kbuild@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.