From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1647 init_dma_rx_desc_rings() warn: always true condition '(queue >= 0) => (0-u32max >= 0)'
Date: Fri, 19 Nov 2021 06:57:59 +0800 [thread overview]
Message-ID: <202111190648.w8EDF2rm-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3920 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6fdf886424cf8c4fff96a20189c00606327e5df6
commit: de0b90e52a116a951ca8b13c924c359d5fc39fa0 net: stmmac: rearrange RX and TX desc init into per-queue basis
date: 7 months ago
config: arm-randconfig-m031-20211116 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
New smatch warnings:
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1647 init_dma_rx_desc_rings() warn: always true condition '(queue >= 0) => (0-u32max >= 0)'
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1647 init_dma_rx_desc_rings() warn: always true condition '(queue >= 0) => (0-u32max >= 0)'
Old smatch warnings:
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1567 stmmac_reinit_rx_buffers() warn: always true condition '(queue >= 0) => (0-u32max >= 0)'
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1567 stmmac_reinit_rx_buffers() warn: always true condition '(queue >= 0) => (0-u32max >= 0)'
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4453 stmmac_xdp_run_prog() error: (-2147483647) too low for ERR_PTR
vim +1647 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1626
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1627 static int init_dma_rx_desc_rings(struct net_device *dev, gfp_t flags)
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1628 {
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1629 struct stmmac_priv *priv = netdev_priv(dev);
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1630 u32 rx_count = priv->plat->rx_queues_to_use;
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1631 u32 queue;
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1632 int ret;
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1633
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1634 /* RX INITIALIZATION */
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1635 netif_dbg(priv, probe, priv->dev,
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1636 "SKB addresses:\nskb\t\tskb data\tdma data\n");
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1637
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1638 for (queue = 0; queue < rx_count; queue++) {
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1639 ret = __init_dma_rx_desc_rings(priv, queue, flags);
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1640 if (ret)
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1641 goto err_init_rx_buffers;
54139cf3bb33fad Joao Pinto 2017-04-06 1642 }
54139cf3bb33fad Joao Pinto 2017-04-06 1643
71fedb0198cbbda Joao Pinto 2017-04-06 1644 return 0;
54139cf3bb33fad Joao Pinto 2017-04-06 1645
71fedb0198cbbda Joao Pinto 2017-04-06 1646 err_init_rx_buffers:
54139cf3bb33fad Joao Pinto 2017-04-06 @1647 while (queue >= 0) {
4298255f26fa91c Ong Boon Leong 2021-04-13 1648 dma_free_rx_skbufs(priv, queue);
54139cf3bb33fad Joao Pinto 2017-04-06 1649
54139cf3bb33fad Joao Pinto 2017-04-06 1650 if (queue == 0)
54139cf3bb33fad Joao Pinto 2017-04-06 1651 break;
54139cf3bb33fad Joao Pinto 2017-04-06 1652
54139cf3bb33fad Joao Pinto 2017-04-06 1653 queue--;
54139cf3bb33fad Joao Pinto 2017-04-06 1654 }
54139cf3bb33fad Joao Pinto 2017-04-06 1655
71fedb0198cbbda Joao Pinto 2017-04-06 1656 return ret;
71fedb0198cbbda Joao Pinto 2017-04-06 1657 }
71fedb0198cbbda Joao Pinto 2017-04-06 1658
:::::: The code at line 1647 was first introduced by commit
:::::: 54139cf3bb33fad075737000f22749cafe3e83a0 net: stmmac: adding multiple buffers for rx
:::::: TO: Joao Pinto <Joao.Pinto@synopsys.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36266 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Ong Boon Leong <boon.leong.ong@intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1647 init_dma_rx_desc_rings() warn: always true condition '(queue >= 0) => (0-u32max >= 0)'
Date: Fri, 19 Nov 2021 06:57:59 +0800 [thread overview]
Message-ID: <202111190648.w8EDF2rm-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3854 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6fdf886424cf8c4fff96a20189c00606327e5df6
commit: de0b90e52a116a951ca8b13c924c359d5fc39fa0 net: stmmac: rearrange RX and TX desc init into per-queue basis
date: 7 months ago
config: arm-randconfig-m031-20211116 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
New smatch warnings:
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1647 init_dma_rx_desc_rings() warn: always true condition '(queue >= 0) => (0-u32max >= 0)'
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1647 init_dma_rx_desc_rings() warn: always true condition '(queue >= 0) => (0-u32max >= 0)'
Old smatch warnings:
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1567 stmmac_reinit_rx_buffers() warn: always true condition '(queue >= 0) => (0-u32max >= 0)'
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1567 stmmac_reinit_rx_buffers() warn: always true condition '(queue >= 0) => (0-u32max >= 0)'
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4453 stmmac_xdp_run_prog() error: (-2147483647) too low for ERR_PTR
vim +1647 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1626
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1627 static int init_dma_rx_desc_rings(struct net_device *dev, gfp_t flags)
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1628 {
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1629 struct stmmac_priv *priv = netdev_priv(dev);
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1630 u32 rx_count = priv->plat->rx_queues_to_use;
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1631 u32 queue;
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1632 int ret;
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1633
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1634 /* RX INITIALIZATION */
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1635 netif_dbg(priv, probe, priv->dev,
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1636 "SKB addresses:\nskb\t\tskb data\tdma data\n");
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1637
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1638 for (queue = 0; queue < rx_count; queue++) {
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1639 ret = __init_dma_rx_desc_rings(priv, queue, flags);
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1640 if (ret)
de0b90e52a116a9 Ong Boon Leong 2021-04-13 1641 goto err_init_rx_buffers;
54139cf3bb33fad Joao Pinto 2017-04-06 1642 }
54139cf3bb33fad Joao Pinto 2017-04-06 1643
71fedb0198cbbda Joao Pinto 2017-04-06 1644 return 0;
54139cf3bb33fad Joao Pinto 2017-04-06 1645
71fedb0198cbbda Joao Pinto 2017-04-06 1646 err_init_rx_buffers:
54139cf3bb33fad Joao Pinto 2017-04-06 @1647 while (queue >= 0) {
4298255f26fa91c Ong Boon Leong 2021-04-13 1648 dma_free_rx_skbufs(priv, queue);
54139cf3bb33fad Joao Pinto 2017-04-06 1649
54139cf3bb33fad Joao Pinto 2017-04-06 1650 if (queue == 0)
54139cf3bb33fad Joao Pinto 2017-04-06 1651 break;
54139cf3bb33fad Joao Pinto 2017-04-06 1652
54139cf3bb33fad Joao Pinto 2017-04-06 1653 queue--;
54139cf3bb33fad Joao Pinto 2017-04-06 1654 }
54139cf3bb33fad Joao Pinto 2017-04-06 1655
71fedb0198cbbda Joao Pinto 2017-04-06 1656 return ret;
71fedb0198cbbda Joao Pinto 2017-04-06 1657 }
71fedb0198cbbda Joao Pinto 2017-04-06 1658
:::::: The code at line 1647 was first introduced by commit
:::::: 54139cf3bb33fad075737000f22749cafe3e83a0 net: stmmac: adding multiple buffers for rx
:::::: TO: Joao Pinto <Joao.Pinto@synopsys.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36266 bytes --]
next reply other threads:[~2021-11-18 22:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-18 22:57 kernel test robot [this message]
2021-11-18 22:57 ` drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1647 init_dma_rx_desc_rings() warn: always true condition '(queue >= 0) => (0-u32max >= 0)' kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-11-22 20:01 kernel test robot
2021-11-22 20:01 ` kernel test robot
2021-08-03 6:33 kernel test robot
2021-08-03 6:33 ` kernel test robot
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=202111190648.w8EDF2rm-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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.