netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: zakkemble@gmail.com, Doug Berger <opendmb@gmail.com>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	netdev@vger.kernel.org, Zak Kemble <zakkemble@gmail.com>
Subject: Re: [PATCH] net: bcmgenet: tidy up stats, expose more stats in ethtool
Date: Mon, 12 May 2025 17:57:02 +0800	[thread overview]
Message-ID: <202505121424.5NKdmAPP-lkp@intel.com> (raw)
In-Reply-To: <20250511214037.2805-1-zakkemble@gmail.com>

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@intel.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

  reply	other threads:[~2025-05-12  9:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-11 21:40 [PATCH] net: bcmgenet: tidy up stats, expose more stats in ethtool zakkemble
2025-05-12  9:57 ` kernel test robot [this message]
2025-05-12 12:24 ` Andrew Lunn
2025-05-12 14:35 ` Florian Fainelli
2025-05-13 19:20   ` Zak Kemble

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=202505121424.5NKdmAPP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=opendmb@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=zakkemble@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).