All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kernel@openeuler.org, Xie XiuQi <xiexiuqi@huawei.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [openeuler:openEuler-1.0-LTS 1495/1495] drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c:119:6: sparse: sparse: symbol 'mlx5i_grp_sw_update_stats' was not declared. Should it be static?
Date: Sun, 16 Mar 2025 23:14:11 +0800	[thread overview]
Message-ID: <202503162347.VAauKjgX-lkp@intel.com> (raw)

tree:   https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head:   d734d6bbda17b68dd3979a9f707564a18cf04761
commit: 78ebe0ea5251a234cfc5ed00b0d196c74ee7b2e4 [1495/1495] net/mlx5e: IPoIB, Add ndo stats support for IPoIB netdevices
config: x86_64-randconfig-123-20250316 (https://download.01.org/0day-ci/archive/20250316/202503162347.VAauKjgX-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250316/202503162347.VAauKjgX-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/202503162347.VAauKjgX-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c:119:6: sparse: sparse: symbol 'mlx5i_grp_sw_update_stats' was not declared. Should it be static?
   drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c:119:6: warning: no previous prototype for 'mlx5i_grp_sw_update_stats' [-Wmissing-prototypes]
     119 | void mlx5i_grp_sw_update_stats(struct mlx5e_priv *priv)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c:35:
   drivers/net/ethernet/mellanox/mlx5/core/en.h:208:19: warning: 'mlx5e_priv_flags' defined but not used [-Wunused-const-variable=]
     208 | static const char mlx5e_priv_flags[][ETH_GSTRING_LEN] = {
         |                   ^~~~~~~~~~~~~~~~

vim +/mlx5i_grp_sw_update_stats +119 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c

   118	
 > 119	void mlx5i_grp_sw_update_stats(struct mlx5e_priv *priv)
   120	{
   121		struct mlx5e_sw_stats s = { 0 };
   122		int i, j;
   123	
   124		for (i = 0; i < priv->profile->max_nch(priv->mdev); i++) {
   125			struct mlx5e_channel_stats *channel_stats;
   126			struct mlx5e_rq_stats *rq_stats;
   127	
   128			channel_stats = &priv->channel_stats[i];
   129			rq_stats = &channel_stats->rq;
   130	
   131			s.rx_packets += rq_stats->packets;
   132			s.rx_bytes   += rq_stats->bytes;
   133	
   134			for (j = 0; j < priv->max_opened_tc; j++) {
   135				struct mlx5e_sq_stats *sq_stats = &channel_stats->sq[j];
   136	
   137				s.tx_packets           += sq_stats->packets;
   138				s.tx_bytes             += sq_stats->bytes;
   139				s.tx_queue_dropped     += sq_stats->dropped;
   140			}
   141		}
   142	
   143		memcpy(&priv->stats.sw, &s, sizeof(s));
   144	}
   145	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2025-03-16 15:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202503162347.VAauKjgX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kernel@openeuler.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=xiexiuqi@huawei.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 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.