All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c:653:14: warning: variable 'reg_c1' set but not used
@ 2021-07-22  9:28 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-07-22  9:28 UTC (permalink / raw)
  To: Chris Mi; +Cc: clang-built-linux, kbuild-all, linux-kernel, Saeed Mahameed

[-- Attachment #1: Type: text/plain, Size: 2797 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3d5895cd351757f69c9a66fb5fc8cf19f454d773
commit: 7319a1cc3ca9f719e4ef1b1882f6fdb57d0719b8 net/mlx5e: TC, Refactor tc update skb function
date:   4 months ago
config: x86_64-randconfig-r026-20210722 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9625ca5b602616b2f5584e8a49ba93c52c141e40)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7319a1cc3ca9f719e4ef1b1882f6fdb57d0719b8
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 7319a1cc3ca9f719e4ef1b1882f6fdb57d0719b8
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c:653:14: warning: variable 'reg_c1' set but not used [-Wunused-but-set-variable]
           u32 reg_c0, reg_c1;
                       ^
   1 warning generated.


vim +/reg_c1 +653 drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c

   645	
   646	bool mlx5e_rep_tc_update_skb(struct mlx5_cqe64 *cqe,
   647				     struct sk_buff *skb,
   648				     struct mlx5e_tc_update_priv *tc_priv)
   649	{
   650		struct mlx5_mapped_obj mapped_obj;
   651		struct mlx5_eswitch *esw;
   652		struct mlx5e_priv *priv;
 > 653		u32 reg_c0, reg_c1;
   654		int err;
   655	
   656		reg_c0 = (be32_to_cpu(cqe->sop_drop_qpn) & MLX5E_TC_FLOW_ID_MASK);
   657		if (!reg_c0 || reg_c0 == MLX5_FS_DEFAULT_FLOW_TAG)
   658			return true;
   659	
   660		/* If reg_c0 is not equal to the default flow tag then skb->mark
   661		 * is not supported and must be reset back to 0.
   662		 */
   663		skb->mark = 0;
   664	
   665		reg_c1 = be32_to_cpu(cqe->ft_metadata);
   666	
   667		priv = netdev_priv(skb->dev);
   668		esw = priv->mdev->priv.eswitch;
   669		err = mapping_find(esw->offloads.reg_c0_obj_pool, reg_c0, &mapped_obj);
   670		if (err) {
   671			netdev_dbg(priv->netdev,
   672				   "Couldn't find mapped object for reg_c0: %d, err: %d\n",
   673				   reg_c0, err);
   674			return false;
   675		}
   676	

---
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: 34962 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c:653:14: warning: variable 'reg_c1' set but not used
@ 2021-07-22  9:28 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-07-22  9:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2866 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3d5895cd351757f69c9a66fb5fc8cf19f454d773
commit: 7319a1cc3ca9f719e4ef1b1882f6fdb57d0719b8 net/mlx5e: TC, Refactor tc update skb function
date:   4 months ago
config: x86_64-randconfig-r026-20210722 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9625ca5b602616b2f5584e8a49ba93c52c141e40)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7319a1cc3ca9f719e4ef1b1882f6fdb57d0719b8
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 7319a1cc3ca9f719e4ef1b1882f6fdb57d0719b8
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c:653:14: warning: variable 'reg_c1' set but not used [-Wunused-but-set-variable]
           u32 reg_c0, reg_c1;
                       ^
   1 warning generated.


vim +/reg_c1 +653 drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c

   645	
   646	bool mlx5e_rep_tc_update_skb(struct mlx5_cqe64 *cqe,
   647				     struct sk_buff *skb,
   648				     struct mlx5e_tc_update_priv *tc_priv)
   649	{
   650		struct mlx5_mapped_obj mapped_obj;
   651		struct mlx5_eswitch *esw;
   652		struct mlx5e_priv *priv;
 > 653		u32 reg_c0, reg_c1;
   654		int err;
   655	
   656		reg_c0 = (be32_to_cpu(cqe->sop_drop_qpn) & MLX5E_TC_FLOW_ID_MASK);
   657		if (!reg_c0 || reg_c0 == MLX5_FS_DEFAULT_FLOW_TAG)
   658			return true;
   659	
   660		/* If reg_c0 is not equal to the default flow tag then skb->mark
   661		 * is not supported and must be reset back to 0.
   662		 */
   663		skb->mark = 0;
   664	
   665		reg_c1 = be32_to_cpu(cqe->ft_metadata);
   666	
   667		priv = netdev_priv(skb->dev);
   668		esw = priv->mdev->priv.eswitch;
   669		err = mapping_find(esw->offloads.reg_c0_obj_pool, reg_c0, &mapped_obj);
   670		if (err) {
   671			netdev_dbg(priv->netdev,
   672				   "Couldn't find mapped object for reg_c0: %d, err: %d\n",
   673				   reg_c0, err);
   674			return false;
   675		}
   676	

---
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: 34962 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-22  9:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-22  9:28 drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c:653:14: warning: variable 'reg_c1' set but not used kernel test robot
2021-07-22  9:28 ` 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.