[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202111130655.JKySWFN2-lkp@intel.com>
Date: Sat, 13 Nov 2021 06:56:05 +0800
From: kernel test robot <lkp@...el.com>
To: Petr Machata <petrm@...dia.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [jpirko-mlxsw:petrm_soft_counters 7/7] net/core/rtnetlink.c:5101:15:
error: unused variable 'size'
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@...el.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
Download attachment ".config.gz" of type "application/gzip" (32735 bytes)
Powered by blists - more mailing lists