[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202505121424.5NKdmAPP-lkp@intel.com>
Date: Mon, 12 May 2025 17:57:02 +0800
From: kernel test robot <lkp@...el.com>
To: zakkemble@...il.com, Doug Berger <opendmb@...il.com>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
linux-kernel@...r.kernel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
netdev@...r.kernel.org, Zak Kemble <zakkemble@...il.com>
Subject: Re: [PATCH] net: bcmgenet: tidy up stats, expose more stats in
ethtool
Hi,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
[also build test WARNING on net/main linus/master v6.15-rc6 next-20250509]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/zakkemble-gmail-com/net-bcmgenet-tidy-up-stats-expose-more-stats-in-ethtool/20250512-054217
base: net-next/main
patch link: https://lore.kernel.org/r/20250511214037.2805-1-zakkemble%40gmail.com
patch subject: [PATCH] net: bcmgenet: tidy up stats, expose more stats in ethtool
config: x86_64-buildonly-randconfig-003-20250512 (https://download.01.org/0day-ci/archive/20250512/202505121424.5NKdmAPP-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250512/202505121424.5NKdmAPP-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505121424.5NKdmAPP-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/broadcom/genet/bcmgenet.c:3552:31: warning: variable 'broadcast' set but not used [-Wunused-but-set-variable]
3552 | unsigned long multicast = 0, broadcast = 0;
| ^
1 warning generated.
vim +/broadcast +3552 drivers/net/ethernet/broadcom/genet/bcmgenet.c
3541
3542 static struct net_device_stats *bcmgenet_get_stats(struct net_device *dev)
3543 {
3544 struct bcmgenet_priv *priv = netdev_priv(dev);
3545 unsigned long tx_bytes = 0, tx_packets = 0;
3546 unsigned long tx_errors = 0, tx_dropped = 0;
3547 unsigned long rx_bytes = 0, rx_packets = 0;
3548 unsigned long rx_errors = 0, rx_dropped = 0;
3549 unsigned long rx_missed = 0, rx_length_errors = 0;
3550 unsigned long rx_over_errors = 0, rx_crc_errors = 0;
3551 unsigned long rx_frame_errors = 0, rx_fragmented_errors = 0;
> 3552 unsigned long multicast = 0, broadcast = 0;
3553 struct bcmgenet_tx_ring *tx_ring;
3554 struct bcmgenet_rx_ring *rx_ring;
3555 unsigned int q;
3556
3557 for (q = 0; q <= priv->hw_params->tx_queues; q++) {
3558 tx_ring = &priv->tx_rings[q];
3559 tx_bytes += tx_ring->bytes;
3560 tx_packets += tx_ring->packets;
3561 tx_errors += tx_ring->errors;
3562 tx_dropped += tx_ring->dropped;
3563 }
3564
3565 for (q = 0; q <= priv->hw_params->rx_queues; q++) {
3566 rx_ring = &priv->rx_rings[q];
3567
3568 rx_bytes += rx_ring->bytes;
3569 rx_packets += rx_ring->packets;
3570 rx_errors += rx_ring->errors;
3571 rx_dropped += rx_ring->dropped;
3572 rx_missed += rx_ring->missed;
3573 rx_length_errors += rx_ring->length_errors;
3574 rx_over_errors += rx_ring->over_errors;
3575 rx_crc_errors += rx_ring->crc_errors;
3576 rx_frame_errors += rx_ring->frame_errors;
3577 rx_fragmented_errors += rx_ring->fragmented_errors;
3578 multicast += rx_ring->multicast;
3579 broadcast += rx_ring->broadcast;
3580 }
3581
3582 rx_errors += rx_length_errors;
3583 rx_errors += rx_crc_errors;
3584 rx_errors += rx_frame_errors;
3585 rx_errors += rx_fragmented_errors;
3586
3587 dev->stats.tx_bytes = tx_bytes;
3588 dev->stats.tx_packets = tx_packets;
3589 dev->stats.tx_errors = tx_errors;
3590 dev->stats.tx_dropped = tx_dropped;
3591 dev->stats.rx_bytes = rx_bytes;
3592 dev->stats.rx_packets = rx_packets;
3593 dev->stats.rx_errors = rx_errors;
3594 dev->stats.rx_dropped = rx_dropped;
3595 dev->stats.rx_missed_errors = rx_missed;
3596 dev->stats.rx_length_errors = rx_length_errors;
3597 dev->stats.rx_over_errors = rx_over_errors;
3598 dev->stats.rx_crc_errors = rx_crc_errors;
3599 dev->stats.rx_frame_errors = rx_frame_errors;
3600 dev->stats.multicast = multicast;
3601 return &dev->stats;
3602 }
3603
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists