* [Intel-wired-lan] [tnguy-net-queue:dev-queue 7/17] drivers/net/ethernet/intel/idpf/idpf_ethtool.c:1713:10: warning: comparison of array 'np->state' not equal to a null pointer is always true
@ 2025-10-04 8:09 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-10-04 8:09 UTC (permalink / raw)
To: Emil Tantilov
Cc: oe-kbuild-all, Intel Wired LAN, Tony Nguyen, Przemek Kitszel,
Aleksandr Loktionov, Chittim Madhu
Hi Emil,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue.git dev-queue
head: e50b34f0f3fb86c9be2f9ad3b7ed483f18b46896
commit: 7c0e8a950dbd30ca46e999cf1d25f3e97a98f174 [7/17] idpf: convert vport state to bitmap
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20251004/202510041605.cSnfIA5l-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 39f292ffa13d7ca0d1edff27ac8fd55024bb4d19)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251004/202510041605.cSnfIA5l-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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510041605.cSnfIA5l-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/ethernet/intel/idpf/idpf_ethtool.c:1713:19: error: use of undeclared identifier '__IDPF_VPORT_UP'; did you mean 'IDPF_VPORT_UP'?
1713 | if (np->state != __IDPF_VPORT_UP)
| ^~~~~~~~~~~~~~~
| IDPF_VPORT_UP
drivers/net/ethernet/intel/idpf/idpf.h:138:2: note: 'IDPF_VPORT_UP' declared here
138 | IDPF_VPORT_UP,
| ^
>> drivers/net/ethernet/intel/idpf/idpf_ethtool.c:1713:10: warning: comparison of array 'np->state' not equal to a null pointer is always true [-Wtautological-pointer-compare]
1713 | if (np->state != __IDPF_VPORT_UP)
| ~~~~^~~~~ ~~~~~~~~~~~~~~~
1 warning and 1 error generated.
--
drivers/net/ethernet/intel/idpf/xdp.c:421:20: error: use of undeclared identifier '__IDPF_VPORT_UP'; did you mean 'IDPF_VPORT_UP'?
421 | if (np->state == __IDPF_VPORT_UP)
| ^~~~~~~~~~~~~~~
| IDPF_VPORT_UP
drivers/net/ethernet/intel/idpf/idpf.h:138:2: note: 'IDPF_VPORT_UP' declared here
138 | IDPF_VPORT_UP,
| ^
>> drivers/net/ethernet/intel/idpf/xdp.c:421:11: warning: comparison of array 'np->state' equal to a null pointer is always false [-Wtautological-pointer-compare]
421 | if (np->state == __IDPF_VPORT_UP)
| ~~~~^~~~~ ~~~~~~~~~~~~~~~
1 warning and 1 error generated.
vim +1713 drivers/net/ethernet/intel/idpf/idpf_ethtool.c
1a49cf814fe1ed Milena Olech 2025-04-16 1687
7a5a03869801e2 Milena Olech 2025-08-29 1688 /**
7a5a03869801e2 Milena Olech 2025-08-29 1689 * idpf_get_ts_stats - Collect HW tstamping statistics
7a5a03869801e2 Milena Olech 2025-08-29 1690 * @netdev: network interface device structure
7a5a03869801e2 Milena Olech 2025-08-29 1691 * @ts_stats: HW timestamping stats structure
7a5a03869801e2 Milena Olech 2025-08-29 1692 *
7a5a03869801e2 Milena Olech 2025-08-29 1693 * Collect HW timestamping statistics including successfully timestamped
7a5a03869801e2 Milena Olech 2025-08-29 1694 * packets, discarded due to illegal values, flushed during releasing PTP and
7a5a03869801e2 Milena Olech 2025-08-29 1695 * skipped due to lack of the free index.
7a5a03869801e2 Milena Olech 2025-08-29 1696 */
7a5a03869801e2 Milena Olech 2025-08-29 1697 static void idpf_get_ts_stats(struct net_device *netdev,
7a5a03869801e2 Milena Olech 2025-08-29 1698 struct ethtool_ts_stats *ts_stats)
7a5a03869801e2 Milena Olech 2025-08-29 1699 {
7a5a03869801e2 Milena Olech 2025-08-29 1700 struct idpf_netdev_priv *np = netdev_priv(netdev);
7a5a03869801e2 Milena Olech 2025-08-29 1701 struct idpf_vport *vport;
7a5a03869801e2 Milena Olech 2025-08-29 1702 unsigned int start;
7a5a03869801e2 Milena Olech 2025-08-29 1703
7a5a03869801e2 Milena Olech 2025-08-29 1704 idpf_vport_ctrl_lock(netdev);
7a5a03869801e2 Milena Olech 2025-08-29 1705 vport = idpf_netdev_to_vport(netdev);
7a5a03869801e2 Milena Olech 2025-08-29 1706 do {
7a5a03869801e2 Milena Olech 2025-08-29 1707 start = u64_stats_fetch_begin(&vport->tstamp_stats.stats_sync);
7a5a03869801e2 Milena Olech 2025-08-29 1708 ts_stats->pkts = u64_stats_read(&vport->tstamp_stats.packets);
7a5a03869801e2 Milena Olech 2025-08-29 1709 ts_stats->lost = u64_stats_read(&vport->tstamp_stats.flushed);
7a5a03869801e2 Milena Olech 2025-08-29 1710 ts_stats->err = u64_stats_read(&vport->tstamp_stats.discarded);
7a5a03869801e2 Milena Olech 2025-08-29 1711 } while (u64_stats_fetch_retry(&vport->tstamp_stats.stats_sync, start));
7a5a03869801e2 Milena Olech 2025-08-29 1712
7a5a03869801e2 Milena Olech 2025-08-29 @1713 if (np->state != __IDPF_VPORT_UP)
7a5a03869801e2 Milena Olech 2025-08-29 1714 goto exit;
7a5a03869801e2 Milena Olech 2025-08-29 1715
7a5a03869801e2 Milena Olech 2025-08-29 1716 for (u16 i = 0; i < vport->num_txq_grp; i++) {
7a5a03869801e2 Milena Olech 2025-08-29 1717 struct idpf_txq_group *txq_grp = &vport->txq_grps[i];
7a5a03869801e2 Milena Olech 2025-08-29 1718
7a5a03869801e2 Milena Olech 2025-08-29 1719 for (u16 j = 0; j < txq_grp->num_txq; j++) {
7a5a03869801e2 Milena Olech 2025-08-29 1720 struct idpf_tx_queue *txq = txq_grp->txqs[j];
7a5a03869801e2 Milena Olech 2025-08-29 1721 struct idpf_tx_queue_stats *stats;
7a5a03869801e2 Milena Olech 2025-08-29 1722 u64 ts;
7a5a03869801e2 Milena Olech 2025-08-29 1723
7a5a03869801e2 Milena Olech 2025-08-29 1724 if (!txq)
7a5a03869801e2 Milena Olech 2025-08-29 1725 continue;
7a5a03869801e2 Milena Olech 2025-08-29 1726
7a5a03869801e2 Milena Olech 2025-08-29 1727 stats = &txq->q_stats;
7a5a03869801e2 Milena Olech 2025-08-29 1728 do {
7a5a03869801e2 Milena Olech 2025-08-29 1729 start = u64_stats_fetch_begin(&txq->stats_sync);
7a5a03869801e2 Milena Olech 2025-08-29 1730
7a5a03869801e2 Milena Olech 2025-08-29 1731 ts = u64_stats_read(&stats->tstamp_skipped);
7a5a03869801e2 Milena Olech 2025-08-29 1732 } while (u64_stats_fetch_retry(&txq->stats_sync,
7a5a03869801e2 Milena Olech 2025-08-29 1733 start));
7a5a03869801e2 Milena Olech 2025-08-29 1734
7a5a03869801e2 Milena Olech 2025-08-29 1735 ts_stats->lost += ts;
7a5a03869801e2 Milena Olech 2025-08-29 1736 }
7a5a03869801e2 Milena Olech 2025-08-29 1737 }
7a5a03869801e2 Milena Olech 2025-08-29 1738
7a5a03869801e2 Milena Olech 2025-08-29 1739 exit:
7a5a03869801e2 Milena Olech 2025-08-29 1740 idpf_vport_ctrl_unlock(netdev);
7a5a03869801e2 Milena Olech 2025-08-29 1741 }
7a5a03869801e2 Milena Olech 2025-08-29 1742
:::::: The code at line 1713 was first introduced by commit
:::::: 7a5a03869801e2f1cabdc55b2e697fea20da5c68 idpf: add HW timestamping statistics
:::::: TO: Milena Olech <milena.olech@intel.com>
:::::: CC: Tony Nguyen <anthony.l.nguyen@intel.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread* [tnguy-net-queue:dev-queue 7/17] drivers/net/ethernet/intel/idpf/idpf_ethtool.c:1713:10: warning: comparison of array 'np->state' not equal to a null pointer is always true
@ 2025-10-04 8:09 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-10-04 8:09 UTC (permalink / raw)
To: Emil Tantilov
Cc: oe-kbuild-all, Intel Wired LAN, Tony Nguyen, Przemek Kitszel,
Aleksandr Loktionov, Chittim Madhu
Hi Emil,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue.git dev-queue
head: e50b34f0f3fb86c9be2f9ad3b7ed483f18b46896
commit: 7c0e8a950dbd30ca46e999cf1d25f3e97a98f174 [7/17] idpf: convert vport state to bitmap
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20251004/202510041605.cSnfIA5l-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 39f292ffa13d7ca0d1edff27ac8fd55024bb4d19)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251004/202510041605.cSnfIA5l-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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510041605.cSnfIA5l-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/ethernet/intel/idpf/idpf_ethtool.c:1713:19: error: use of undeclared identifier '__IDPF_VPORT_UP'; did you mean 'IDPF_VPORT_UP'?
1713 | if (np->state != __IDPF_VPORT_UP)
| ^~~~~~~~~~~~~~~
| IDPF_VPORT_UP
drivers/net/ethernet/intel/idpf/idpf.h:138:2: note: 'IDPF_VPORT_UP' declared here
138 | IDPF_VPORT_UP,
| ^
>> drivers/net/ethernet/intel/idpf/idpf_ethtool.c:1713:10: warning: comparison of array 'np->state' not equal to a null pointer is always true [-Wtautological-pointer-compare]
1713 | if (np->state != __IDPF_VPORT_UP)
| ~~~~^~~~~ ~~~~~~~~~~~~~~~
1 warning and 1 error generated.
--
drivers/net/ethernet/intel/idpf/xdp.c:421:20: error: use of undeclared identifier '__IDPF_VPORT_UP'; did you mean 'IDPF_VPORT_UP'?
421 | if (np->state == __IDPF_VPORT_UP)
| ^~~~~~~~~~~~~~~
| IDPF_VPORT_UP
drivers/net/ethernet/intel/idpf/idpf.h:138:2: note: 'IDPF_VPORT_UP' declared here
138 | IDPF_VPORT_UP,
| ^
>> drivers/net/ethernet/intel/idpf/xdp.c:421:11: warning: comparison of array 'np->state' equal to a null pointer is always false [-Wtautological-pointer-compare]
421 | if (np->state == __IDPF_VPORT_UP)
| ~~~~^~~~~ ~~~~~~~~~~~~~~~
1 warning and 1 error generated.
vim +1713 drivers/net/ethernet/intel/idpf/idpf_ethtool.c
1a49cf814fe1ed Milena Olech 2025-04-16 1687
7a5a03869801e2 Milena Olech 2025-08-29 1688 /**
7a5a03869801e2 Milena Olech 2025-08-29 1689 * idpf_get_ts_stats - Collect HW tstamping statistics
7a5a03869801e2 Milena Olech 2025-08-29 1690 * @netdev: network interface device structure
7a5a03869801e2 Milena Olech 2025-08-29 1691 * @ts_stats: HW timestamping stats structure
7a5a03869801e2 Milena Olech 2025-08-29 1692 *
7a5a03869801e2 Milena Olech 2025-08-29 1693 * Collect HW timestamping statistics including successfully timestamped
7a5a03869801e2 Milena Olech 2025-08-29 1694 * packets, discarded due to illegal values, flushed during releasing PTP and
7a5a03869801e2 Milena Olech 2025-08-29 1695 * skipped due to lack of the free index.
7a5a03869801e2 Milena Olech 2025-08-29 1696 */
7a5a03869801e2 Milena Olech 2025-08-29 1697 static void idpf_get_ts_stats(struct net_device *netdev,
7a5a03869801e2 Milena Olech 2025-08-29 1698 struct ethtool_ts_stats *ts_stats)
7a5a03869801e2 Milena Olech 2025-08-29 1699 {
7a5a03869801e2 Milena Olech 2025-08-29 1700 struct idpf_netdev_priv *np = netdev_priv(netdev);
7a5a03869801e2 Milena Olech 2025-08-29 1701 struct idpf_vport *vport;
7a5a03869801e2 Milena Olech 2025-08-29 1702 unsigned int start;
7a5a03869801e2 Milena Olech 2025-08-29 1703
7a5a03869801e2 Milena Olech 2025-08-29 1704 idpf_vport_ctrl_lock(netdev);
7a5a03869801e2 Milena Olech 2025-08-29 1705 vport = idpf_netdev_to_vport(netdev);
7a5a03869801e2 Milena Olech 2025-08-29 1706 do {
7a5a03869801e2 Milena Olech 2025-08-29 1707 start = u64_stats_fetch_begin(&vport->tstamp_stats.stats_sync);
7a5a03869801e2 Milena Olech 2025-08-29 1708 ts_stats->pkts = u64_stats_read(&vport->tstamp_stats.packets);
7a5a03869801e2 Milena Olech 2025-08-29 1709 ts_stats->lost = u64_stats_read(&vport->tstamp_stats.flushed);
7a5a03869801e2 Milena Olech 2025-08-29 1710 ts_stats->err = u64_stats_read(&vport->tstamp_stats.discarded);
7a5a03869801e2 Milena Olech 2025-08-29 1711 } while (u64_stats_fetch_retry(&vport->tstamp_stats.stats_sync, start));
7a5a03869801e2 Milena Olech 2025-08-29 1712
7a5a03869801e2 Milena Olech 2025-08-29 @1713 if (np->state != __IDPF_VPORT_UP)
7a5a03869801e2 Milena Olech 2025-08-29 1714 goto exit;
7a5a03869801e2 Milena Olech 2025-08-29 1715
7a5a03869801e2 Milena Olech 2025-08-29 1716 for (u16 i = 0; i < vport->num_txq_grp; i++) {
7a5a03869801e2 Milena Olech 2025-08-29 1717 struct idpf_txq_group *txq_grp = &vport->txq_grps[i];
7a5a03869801e2 Milena Olech 2025-08-29 1718
7a5a03869801e2 Milena Olech 2025-08-29 1719 for (u16 j = 0; j < txq_grp->num_txq; j++) {
7a5a03869801e2 Milena Olech 2025-08-29 1720 struct idpf_tx_queue *txq = txq_grp->txqs[j];
7a5a03869801e2 Milena Olech 2025-08-29 1721 struct idpf_tx_queue_stats *stats;
7a5a03869801e2 Milena Olech 2025-08-29 1722 u64 ts;
7a5a03869801e2 Milena Olech 2025-08-29 1723
7a5a03869801e2 Milena Olech 2025-08-29 1724 if (!txq)
7a5a03869801e2 Milena Olech 2025-08-29 1725 continue;
7a5a03869801e2 Milena Olech 2025-08-29 1726
7a5a03869801e2 Milena Olech 2025-08-29 1727 stats = &txq->q_stats;
7a5a03869801e2 Milena Olech 2025-08-29 1728 do {
7a5a03869801e2 Milena Olech 2025-08-29 1729 start = u64_stats_fetch_begin(&txq->stats_sync);
7a5a03869801e2 Milena Olech 2025-08-29 1730
7a5a03869801e2 Milena Olech 2025-08-29 1731 ts = u64_stats_read(&stats->tstamp_skipped);
7a5a03869801e2 Milena Olech 2025-08-29 1732 } while (u64_stats_fetch_retry(&txq->stats_sync,
7a5a03869801e2 Milena Olech 2025-08-29 1733 start));
7a5a03869801e2 Milena Olech 2025-08-29 1734
7a5a03869801e2 Milena Olech 2025-08-29 1735 ts_stats->lost += ts;
7a5a03869801e2 Milena Olech 2025-08-29 1736 }
7a5a03869801e2 Milena Olech 2025-08-29 1737 }
7a5a03869801e2 Milena Olech 2025-08-29 1738
7a5a03869801e2 Milena Olech 2025-08-29 1739 exit:
7a5a03869801e2 Milena Olech 2025-08-29 1740 idpf_vport_ctrl_unlock(netdev);
7a5a03869801e2 Milena Olech 2025-08-29 1741 }
7a5a03869801e2 Milena Olech 2025-08-29 1742
:::::: The code at line 1713 was first introduced by commit
:::::: 7a5a03869801e2f1cabdc55b2e697fea20da5c68 idpf: add HW timestamping statistics
:::::: TO: Milena Olech <milena.olech@intel.com>
:::::: CC: Tony Nguyen <anthony.l.nguyen@intel.com>
--
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:[~2025-10-04 8:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-04 8:09 [Intel-wired-lan] [tnguy-net-queue:dev-queue 7/17] drivers/net/ethernet/intel/idpf/idpf_ethtool.c:1713:10: warning: comparison of array 'np->state' not equal to a null pointer is always true kernel test robot
2025-10-04 8:09 ` 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.