* [mac80211-next:master 2177/2199] net/ethtool/cabletest.c:230:5: warning: no previous prototype for 'ethnl_act_cable_test_tdr_cfg'
@ 2020-05-27 20:15 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-05-27 20:15 UTC (permalink / raw)
To: Andrew Lunn; +Cc: kbuild-all, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 3832 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
head: 119aadf816f5373dc82ca4109d6d5b777e00475b
commit: f2bc8ad31a7f814237bc6301d59296d76505a688 [2177/2199] net: ethtool: Allow PHY cable test TDR data to configured
config: alpha-randconfig-r024-20200527 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
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
git checkout f2bc8ad31a7f814237bc6301d59296d76505a688
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> net/ethtool/cabletest.c:230:5: warning: no previous prototype for 'ethnl_act_cable_test_tdr_cfg' [-Wmissing-prototypes]
230 | int ethnl_act_cable_test_tdr_cfg(const struct nlattr *nest,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/ethnl_act_cable_test_tdr_cfg +230 net/ethtool/cabletest.c
228
229 /* CABLE_TEST_TDR_ACT */
> 230 int ethnl_act_cable_test_tdr_cfg(const struct nlattr *nest,
231 struct genl_info *info,
232 struct phy_tdr_config *cfg)
233 {
234 struct nlattr *tb[ETHTOOL_A_CABLE_TEST_TDR_CFG_MAX + 1];
235 int ret;
236
237 ret = nla_parse_nested(tb, ETHTOOL_A_CABLE_TEST_TDR_CFG_MAX, nest,
238 cable_test_tdr_act_cfg_policy, info->extack);
239 if (ret < 0)
240 return ret;
241
242 if (tb[ETHTOOL_A_CABLE_TEST_TDR_CFG_FIRST])
243 cfg->first = nla_get_u32(
244 tb[ETHTOOL_A_CABLE_TEST_TDR_CFG_FIRST]);
245 else
246 cfg->first = 100;
247 if (tb[ETHTOOL_A_CABLE_TEST_TDR_CFG_LAST])
248 cfg->last = nla_get_u32(tb[ETHTOOL_A_CABLE_TEST_TDR_CFG_LAST]);
249 else
250 cfg->last = MAX_CABLE_LENGTH_CM;
251
252 if (tb[ETHTOOL_A_CABLE_TEST_TDR_CFG_STEP])
253 cfg->step = nla_get_u32(tb[ETHTOOL_A_CABLE_TEST_TDR_CFG_STEP]);
254 else
255 cfg->step = 100;
256
257 if (tb[ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR]) {
258 cfg->pair = nla_get_u8(tb[ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR]);
259 if (cfg->pair > ETHTOOL_A_CABLE_PAIR_D) {
260 NL_SET_ERR_MSG_ATTR(
261 info->extack,
262 tb[ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR],
263 "invalid pair parameter");
264 return -EINVAL;
265 }
266 } else {
267 cfg->pair = PHY_PAIR_ALL;
268 }
269
270 if (cfg->first > MAX_CABLE_LENGTH_CM) {
271 NL_SET_ERR_MSG_ATTR(info->extack,
272 tb[ETHTOOL_A_CABLE_TEST_TDR_CFG_FIRST],
273 "invalid first parameter");
274 return -EINVAL;
275 }
276
277 if (cfg->last > MAX_CABLE_LENGTH_CM) {
278 NL_SET_ERR_MSG_ATTR(info->extack,
279 tb[ETHTOOL_A_CABLE_TEST_TDR_CFG_LAST],
280 "invalid last parameter");
281 return -EINVAL;
282 }
283
284 if (cfg->first > cfg->last) {
285 NL_SET_ERR_MSG(info->extack, "invalid first/last parameter");
286 return -EINVAL;
287 }
288
289 if (!cfg->step) {
290 NL_SET_ERR_MSG_ATTR(info->extack,
291 tb[ETHTOOL_A_CABLE_TEST_TDR_CFG_STEP],
292 "invalid step parameter");
293 return -EINVAL;
294 }
295
296 if (cfg->step > (cfg->last - cfg->first)) {
297 NL_SET_ERR_MSG_ATTR(info->extack,
298 tb[ETHTOOL_A_CABLE_TEST_TDR_CFG_STEP],
299 "step parameter too big");
300 return -EINVAL;
301 }
302
303 return 0;
304 }
305
---
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: 33083 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-27 20:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27 20:15 [mac80211-next:master 2177/2199] net/ethtool/cabletest.c:230:5: warning: no previous prototype for 'ethnl_act_cable_test_tdr_cfg' kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).