From: kernel test robot <lkp@intel.com>
To: Petr Machata <petrm@nvidia.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org
Subject: [jpirko-mlxsw:petrm_soft_counters 7/7] net/core/rtnetlink.c:5101:15: error: unused variable 'size'
Date: Sat, 13 Nov 2021 06:56:05 +0800 [thread overview]
Message-ID: <202111130655.JKySWFN2-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2853 bytes --]
tree: https://github.com/jpirko/linux_mlxsw petrm_soft_counters
head: d35d00a6d28ff7a34145438df3a2b39abd00edc3
commit: d35d00a6d28ff7a34145438df3a2b39abd00edc3 [7/7] wip
config: riscv-buildonly-randconfig-r002-20211111 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/jpirko/linux_mlxsw/commit/d35d00a6d28ff7a34145438df3a2b39abd00edc3
git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
git fetch --no-tags jpirko-mlxsw petrm_soft_counters
git checkout d35d00a6d28ff7a34145438df3a2b39abd00edc3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> net/core/rtnetlink.c:5101:15: error: unused variable 'size' [-Werror,-Wunused-variable]
unsigned int size = info->get_size(info, dev);
^
1 error generated.
vim +/size +5101 net/core/rtnetlink.c
5095
5096 static int
5097 rtnl_offload_xstats_fill_hw_stats(const struct rtnl_offload_xstats_info *info,
5098 struct net_device *dev, struct sk_buff *skb,
5099 struct netlink_ext_ack *extack)
5100 {
> 5101 unsigned int size = info->get_size(info, dev);
5102 enum netdev_hw_stats_type used_hw_stats = 0;
5103 struct rtnl_link_stats64 stats;
5104 struct nlattr *nest;
5105 int err;
5106
5107 nest = nla_nest_start_noflag(skb, info->attr_id);
5108 if (!nest)
5109 return -EMSGSIZE;
5110
5111 if (dev->offload_hw_stats) {
5112 err = netdev_offload_xstats_hw_stats_get(dev, &stats,
5113 &used_hw_stats,
5114 extack);
5115 if (err)
5116 goto nla_put_failure;
5117
5118 if (nla_put_64bit(skb, IFLA_OFFLOAD_XSTATS_HW_STATS_STATS,
5119 sizeof(stats), &stats,
5120 IFLA_OFFLOAD_XSTATS_UNSPEC))
5121 goto nla_put_failure;
5122 }
5123
5124 if (nla_put_bitfield32(skb, IFLA_OFFLOAD_XSTATS_HW_STATS_USED_TYPE,
5125 used_hw_stats, IFLA_HW_STATS_ANY))
5126 goto nla_put_failure;
5127
5128 nla_nest_end(skb, nest);
5129 return 0;
5130
5131 nla_put_failure:
5132 nla_nest_cancel(skb, nest);
5133 return -EMSGSIZE;
5134 }
5135
---
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: 32735 bytes --]
reply other threads:[~2021-11-12 22:56 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=202111130655.JKySWFN2-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=petrm@nvidia.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