* drivers/tty/serial/cpm_uart.c:1533:31: sparse: sparse: unsigned value that used to be signed checked against zero?
@ 2026-09-04 17:43 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-09-04 17:43 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check warning: drivers/tty/serial/cpm_uart.c:1533:31: sparse: sparse: unsigned value that used to be signed checked against zero?"
::::::
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: 421066905cbceca1f78cba5f7d92b4980317ab2b
commit: 831603b3e8aa3892de229fda846b2f859c518699 serial: cpm_uart: replace irq_of_parse_and_map with platform_get_irq
date: 8 weeks ago
:::::: branch date: 2 hours ago
:::::: commit date: 8 weeks ago
config: powerpc-randconfig-r111-20260904 (https://download.01.org/0day-ci/archive/20260905/202609050125.uYZtQhn3-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260905/202609050125.uYZtQhn3-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: 831603b3e8aa ("serial: cpm_uart: replace irq_of_parse_and_map with platform_get_irq")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202609050125.uYZtQhn3-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/tty/serial/cpm_uart.c:1091:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cpm_buf_desc volatile [usertype] *bdp @@ got struct cpm_buf_desc [noderef] [usertype] __iomem *rx_cur @@
drivers/tty/serial/cpm_uart.c:1091:13: sparse: expected struct cpm_buf_desc volatile [usertype] *bdp
drivers/tty/serial/cpm_uart.c:1091:13: sparse: got struct cpm_buf_desc [noderef] [usertype] __iomem *rx_cur
drivers/tty/serial/cpm_uart.c:1110:21: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cpm_buf_desc volatile [usertype] *bdp @@ got struct cpm_buf_desc [noderef] [usertype] __iomem *rx_bd_base @@
drivers/tty/serial/cpm_uart.c:1110:21: sparse: expected struct cpm_buf_desc volatile [usertype] *bdp
drivers/tty/serial/cpm_uart.c:1110:21: sparse: got struct cpm_buf_desc [noderef] [usertype] __iomem *rx_bd_base
drivers/tty/serial/cpm_uart.c:1113:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cpm_buf_desc [noderef] [usertype] __iomem *rx_cur @@ got struct cpm_buf_desc [usertype] * @@
drivers/tty/serial/cpm_uart.c:1113:23: sparse: expected struct cpm_buf_desc [noderef] [usertype] __iomem *rx_cur
drivers/tty/serial/cpm_uart.c:1113:23: sparse: got struct cpm_buf_desc [usertype] *
>> drivers/tty/serial/cpm_uart.c:1533:31: sparse: sparse: unsigned value that used to be signed checked against zero?
drivers/tty/serial/cpm_uart.c:1532:43: sparse: signed value source
vim +1533 drivers/tty/serial/cpm_uart.c
7ae870368d198a drivers/serial/cpm_uart/cpm_uart_core.c Scott Wood 2007-07-17 1515
9671f09921d93e drivers/tty/serial/cpm_uart/cpm_uart_core.c Bill Pemberton 2012-11-19 1516 static int cpm_uart_probe(struct platform_device *ofdev)
7ae870368d198a drivers/serial/cpm_uart/cpm_uart_core.c Scott Wood 2007-07-17 1517 {
7ae870368d198a drivers/serial/cpm_uart/cpm_uart_core.c Scott Wood 2007-07-17 1518 int index = probe_index++;
7ae870368d198a drivers/serial/cpm_uart/cpm_uart_core.c Scott Wood 2007-07-17 1519 struct uart_cpm_port *pinfo = &cpm_uart_ports[index];
7ae870368d198a drivers/serial/cpm_uart/cpm_uart_core.c Scott Wood 2007-07-17 1520 int ret;
7ae870368d198a drivers/serial/cpm_uart/cpm_uart_core.c Scott Wood 2007-07-17 1521
7ae870368d198a drivers/serial/cpm_uart/cpm_uart_core.c Scott Wood 2007-07-17 1522 pinfo->port.line = index;
7ae870368d198a drivers/serial/cpm_uart/cpm_uart_core.c Scott Wood 2007-07-17 1523
7ae870368d198a drivers/serial/cpm_uart/cpm_uart_core.c Scott Wood 2007-07-17 1524 if (index >= UART_NR)
7ae870368d198a drivers/serial/cpm_uart/cpm_uart_core.c Scott Wood 2007-07-17 1525 return -ENODEV;
7ae870368d198a drivers/serial/cpm_uart/cpm_uart_core.c Scott Wood 2007-07-17 1526
696faedd616e20 drivers/tty/serial/cpm_uart/cpm_uart_core.c Jingoo Han 2013-05-23 1527 platform_set_drvdata(ofdev, pinfo);
7ae870368d198a drivers/serial/cpm_uart/cpm_uart_core.c Scott Wood 2007-07-17 1528
bd86ef378412fc drivers/serial/cpm_uart/cpm_uart_core.c Scott Wood 2009-04-03 1529 /* initialize the device pointer for the port */
bd86ef378412fc drivers/serial/cpm_uart/cpm_uart_core.c Scott Wood 2009-04-03 1530 pinfo->port.dev = &ofdev->dev;
bd86ef378412fc drivers/serial/cpm_uart/cpm_uart_core.c Scott Wood 2009-04-03 1531
831603b3e8aa38 drivers/tty/serial/cpm_uart.c Rosen Penev 2026-06-06 1532 pinfo->port.irq = platform_get_irq(ofdev, 0);
831603b3e8aa38 drivers/tty/serial/cpm_uart.c Rosen Penev 2026-06-06 @1533 if (pinfo->port.irq < 0)
831603b3e8aa38 drivers/tty/serial/cpm_uart.c Rosen Penev 2026-06-06 1534 return pinfo->port.irq;
7ae870368d198a drivers/serial/cpm_uart/cpm_uart_core.c Scott Wood 2007-07-17 1535
30963b2f75bfdb 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);
30963b2f75bfdb drivers/tty/serial/cpm_uart/cpm_uart_core.c Christophe Leroy 2022-09-30 1537 if (!ret)
7ae870368d198a drivers/serial/cpm_uart/cpm_uart_core.c Scott Wood 2007-07-17 1538 return uart_add_one_port(&cpm_reg, &pinfo->port);
30963b2f75bfdb drivers/tty/serial/cpm_uart/cpm_uart_core.c Christophe Leroy 2022-09-30 1539
30963b2f75bfdb drivers/tty/serial/cpm_uart/cpm_uart_core.c Christophe Leroy 2022-09-30 1540 return ret;
7ae870368d198a drivers/serial/cpm_uart/cpm_uart_core.c Scott Wood 2007-07-17 1541 }
7ae870368d198a 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* drivers/tty/serial/cpm_uart.c:1533:31: sparse: sparse: unsigned value that used to be signed checked against zero?
@ 2026-10-27 2:13 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-10-27 2:13 UTC (permalink / raw)
To: Rosen Penev; +Cc: oe-kbuild-all, linux-kernel
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d135ab453a7400a34930bdda1ef4bdc8acfac80e
commit: 831603b3e8aa3892de229fda846b2f859c518699 serial: cpm_uart: replace irq_of_parse_and_map with platform_get_irq
date: 4 months ago
config: powerpc-randconfig-r2304-20261026 (https://download.01.org/0day-ci/archive/20261027/202610270303.TbvTqZ1N-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 13.5.0
sparse: v0.6.5-rc1-1-gc4640450
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261027/202610270303.TbvTqZ1N-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: 831603b3e8aa ("serial: cpm_uart: replace irq_of_parse_and_map with platform_get_irq")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610270303.TbvTqZ1N-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/tty/serial/cpm_uart.c:1091:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cpm_buf_desc volatile [usertype] *bdp @@ got struct cpm_buf_desc [noderef] [usertype] __iomem *rx_cur @@
drivers/tty/serial/cpm_uart.c:1091:13: sparse: expected struct cpm_buf_desc volatile [usertype] *bdp
drivers/tty/serial/cpm_uart.c:1091:13: sparse: got struct cpm_buf_desc [noderef] [usertype] __iomem *rx_cur
drivers/tty/serial/cpm_uart.c:1110:21: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cpm_buf_desc volatile [usertype] *bdp @@ got struct cpm_buf_desc [noderef] [usertype] __iomem *rx_bd_base @@
drivers/tty/serial/cpm_uart.c:1110:21: sparse: expected struct cpm_buf_desc volatile [usertype] *bdp
drivers/tty/serial/cpm_uart.c:1110:21: sparse: got struct cpm_buf_desc [noderef] [usertype] __iomem *rx_bd_base
drivers/tty/serial/cpm_uart.c:1113:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cpm_buf_desc [noderef] [usertype] __iomem *rx_cur @@ got struct cpm_buf_desc [usertype] * @@
drivers/tty/serial/cpm_uart.c:1113:23: sparse: expected struct cpm_buf_desc [noderef] [usertype] __iomem *rx_cur
drivers/tty/serial/cpm_uart.c:1113:23: sparse: got struct cpm_buf_desc [usertype] *
>> drivers/tty/serial/cpm_uart.c:1533:31: sparse: sparse: unsigned value that used to be signed checked against zero?
drivers/tty/serial/cpm_uart.c:1532:43: sparse: signed value source
vim +1533 drivers/tty/serial/cpm_uart.c
1515
1516 static int cpm_uart_probe(struct platform_device *ofdev)
1517 {
1518 int index = probe_index++;
1519 struct uart_cpm_port *pinfo = &cpm_uart_ports[index];
1520 int ret;
1521
1522 pinfo->port.line = index;
1523
1524 if (index >= UART_NR)
1525 return -ENODEV;
1526
1527 platform_set_drvdata(ofdev, pinfo);
1528
1529 /* initialize the device pointer for the port */
1530 pinfo->port.dev = &ofdev->dev;
1531
1532 pinfo->port.irq = platform_get_irq(ofdev, 0);
> 1533 if (pinfo->port.irq < 0)
1534 return pinfo->port.irq;
1535
1536 ret = cpm_uart_init_port(ofdev->dev.of_node, pinfo);
1537 if (!ret)
1538 return uart_add_one_port(&cpm_reg, &pinfo->port);
1539
1540 return ret;
1541 }
1542
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-27 2:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-27 2:13 drivers/tty/serial/cpm_uart.c:1533:31: sparse: sparse: unsigned value that used to be signed checked against zero? kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2026-09-04 17:43 kernel test robot
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.