From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c:653:14: warning: variable 'reg_c1' set but not used
Date: Thu, 22 Jul 2021 17:28:30 +0800 [thread overview]
Message-ID: <202107221724.3ISfaECp-lkp@intel.com> (raw)
[-- 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 --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Chris Mi <cmi@nvidia.com>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org, Saeed Mahameed <saeedm@nvidia.com>
Subject: drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c:653:14: warning: variable 'reg_c1' set but not used
Date: Thu, 22 Jul 2021 17:28:30 +0800 [thread overview]
Message-ID: <202107221724.3ISfaECp-lkp@intel.com> (raw)
[-- 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 --]
next reply other threads:[~2021-07-22 9:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-22 9:28 kernel test robot [this message]
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
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=202107221724.3ISfaECp-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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.