[jpirko-mlxsw:petrm_soft_counters 1/4] drivers/net/netdevsim/netdev.c:291:5: warning: no previous prototype for 'nsim_dcb_dcbnl_getbuffer'

From: kernel test robot
Date: Tue Oct 26 2021 - 16:31:19 EST


tree: https://github.com/jpirko/linux_mlxsw petrm_soft_counters
head: a8a72b09197b26075b17e1722bf534d141e26034
commit: 33151ced43f15dd778ccb057cc752eedee86b9ec [1/4] netdevsim DCB
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/jpirko/linux_mlxsw/commit/33151ced43f15dd778ccb057cc752eedee86b9ec
git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
git fetch --no-tags jpirko-mlxsw petrm_soft_counters
git checkout 33151ced43f15dd778ccb057cc752eedee86b9ec
# save the attached .config to linux build tree
make W=1 ARCH=x86_64

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

All warnings (new ones prefixed by >>):

>> drivers/net/netdevsim/netdev.c:291:5: warning: no previous prototype for 'nsim_dcb_dcbnl_getbuffer' [-Wmissing-prototypes]
291 | int nsim_dcb_dcbnl_getbuffer(struct net_device *dev, struct dcbnl_buffer *buf)
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:302:5: warning: no previous prototype for 'nsim_dcb_dcbnl_setbuffer' [-Wmissing-prototypes]
302 | int nsim_dcb_dcbnl_setbuffer(struct net_device *dev, struct dcbnl_buffer *buf)
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:311:5: warning: no previous prototype for 'nsim_dcb_ieee_getets' [-Wmissing-prototypes]
311 | int nsim_dcb_ieee_getets(struct net_device *dev, struct ieee_ets *ets)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:320:5: warning: no previous prototype for 'nsim_dcb_ieee_setets' [-Wmissing-prototypes]
320 | int nsim_dcb_ieee_setets(struct net_device *dev, struct ieee_ets *ets)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:329:5: warning: no previous prototype for 'nsim_dcb_ieee_getmaxrate' [-Wmissing-prototypes]
329 | int nsim_dcb_ieee_getmaxrate(struct net_device *dev, struct ieee_maxrate *maxrate)
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:338:5: warning: no previous prototype for 'nsim_dcb_ieee_setmaxrate' [-Wmissing-prototypes]
338 | int nsim_dcb_ieee_setmaxrate(struct net_device *dev, struct ieee_maxrate *maxrate)
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:347:5: warning: no previous prototype for 'nsim_dcb_ieee_getpfc' [-Wmissing-prototypes]
347 | int nsim_dcb_ieee_getpfc(struct net_device *dev, struct ieee_pfc *pfc)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:366:5: warning: no previous prototype for 'nsim_dcb_ieee_setpfc' [-Wmissing-prototypes]
366 | int nsim_dcb_ieee_setpfc(struct net_device *dev, struct ieee_pfc *pfc)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:379:5: warning: no previous prototype for 'nsim_dcb_ieee_getqcn' [-Wmissing-prototypes]
379 | int nsim_dcb_ieee_getqcn(struct net_device *dev, struct ieee_qcn *qcn)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:385:5: warning: no previous prototype for 'nsim_dcb_ieee_setqcn' [-Wmissing-prototypes]
385 | int nsim_dcb_ieee_setqcn(struct net_device *dev, struct ieee_qcn *qcn)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:391:5: warning: no previous prototype for 'nsim_dcb_ieee_getqcnstats' [-Wmissing-prototypes]
391 | int nsim_dcb_ieee_getqcnstats(struct net_device *dev, struct ieee_qcn_stats *qcn_stats)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:397:5: warning: no previous prototype for 'nsim_dcb_ieee_peer_getets' [-Wmissing-prototypes]
397 | int nsim_dcb_ieee_peer_getets(struct net_device *dev, struct ieee_ets *ets)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:403:5: warning: no previous prototype for 'nsim_dcb_ieee_peer_getpfc' [-Wmissing-prototypes]
403 | int nsim_dcb_ieee_peer_getpfc(struct net_device *dev, struct ieee_pfc *pfc)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:409:4: warning: no previous prototype for 'nsim_dcb_getstate' [-Wmissing-prototypes]
409 | u8 nsim_dcb_getstate(struct net_device *dev)
| ^~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:415:4: warning: no previous prototype for 'nsim_dcb_setstate' [-Wmissing-prototypes]
415 | u8 nsim_dcb_setstate(struct net_device *dev, u8 enabled)
| ^~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:421:6: warning: no previous prototype for 'nsim_dcb_getpermhwaddr' [-Wmissing-prototypes]
421 | void nsim_dcb_getpermhwaddr(struct net_device *dev, u8 *perm_addr)
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:426:6: warning: no previous prototype for 'nsim_dcb_setpgtccfgtx' [-Wmissing-prototypes]
426 | void nsim_dcb_setpgtccfgtx(struct net_device *dev, int prio, u8 prio_type,
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:432:6: warning: no previous prototype for 'nsim_dcb_setpgbwgcfgtx' [-Wmissing-prototypes]
432 | void nsim_dcb_setpgbwgcfgtx(struct net_device *dev, int pgid, u8 bw_pct)
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:437:6: warning: no previous prototype for 'nsim_dcb_setpgtccfgrx' [-Wmissing-prototypes]
437 | void nsim_dcb_setpgtccfgrx(struct net_device *dev, int prio, u8 prio_type,
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/netdev.c:443:6: warning: no previous prototype for 'nsim_dcb_setpgbwgcfgrx' [-Wmissing-prototypes]
443 | void nsim_dcb_setpgbwgcfgrx(struct net_device *dev, int pgid, u8 bw_pct)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:448:6: warning: no previous prototype for 'nsim_dcb_getpgtccfgtx' [-Wmissing-prototypes]
448 | void nsim_dcb_getpgtccfgtx(struct net_device *dev, int tc, u8 *prio_type,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:454:6: warning: no previous prototype for 'nsim_dcb_getpgbwgcfgtx' [-Wmissing-prototypes]
454 | void nsim_dcb_getpgbwgcfgtx(struct net_device *dev, int pgid, u8 *bw_pct)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:459:6: warning: no previous prototype for 'nsim_dcb_getpgtccfgrx' [-Wmissing-prototypes]
459 | void nsim_dcb_getpgtccfgrx(struct net_device *dev, int tc, u8 *prio,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:465:6: warning: no previous prototype for 'nsim_dcb_getpgbwgcfgrx' [-Wmissing-prototypes]
465 | void nsim_dcb_getpgbwgcfgrx(struct net_device *dev, int pg_id, u8 *bw_pct)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:470:6: warning: no previous prototype for 'nsim_dcb_setpfccfg' [-Wmissing-prototypes]
470 | void nsim_dcb_setpfccfg(struct net_device *dev, int prio, u8 enabled)
| ^~~~~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:475:6: warning: no previous prototype for 'nsim_dcb_getpfccfg' [-Wmissing-prototypes]
475 | void nsim_dcb_getpfccfg(struct net_device *dev, int prio, u8 *enabled)
| ^~~~~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:480:4: warning: no previous prototype for 'nsim_dcb_setall' [-Wmissing-prototypes]
480 | u8 nsim_dcb_setall(struct net_device *dev)
| ^~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:486:4: warning: no previous prototype for 'nsim_dcb_getcap' [-Wmissing-prototypes]
486 | u8 nsim_dcb_getcap(struct net_device *dev, int capid, u8 *cap)
| ^~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:492:5: warning: no previous prototype for 'nsim_dcb_getnumtcs' [-Wmissing-prototypes]
492 | int nsim_dcb_getnumtcs(struct net_device *dev, int tcs_id, u8 *num)
| ^~~~~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:498:5: warning: no previous prototype for 'nsim_dcb_setnumtcs' [-Wmissing-prototypes]
498 | int nsim_dcb_setnumtcs(struct net_device *dev, int tcs_id, u8 num)
| ^~~~~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:504:4: warning: no previous prototype for 'nsim_dcb_getpfcstate' [-Wmissing-prototypes]
504 | u8 nsim_dcb_getpfcstate(struct net_device *dev)
| ^~~~~~~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:510:6: warning: no previous prototype for 'nsim_dcb_setpfcstate' [-Wmissing-prototypes]
510 | void nsim_dcb_setpfcstate(struct net_device *dev, u8 enabled)
| ^~~~~~~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:515:5: warning: no previous prototype for 'nsim_dcb_setapp' [-Wmissing-prototypes]
515 | int nsim_dcb_setapp(struct net_device *dev, u8 sel, u16 pid, u8 prio)
| ^~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:521:5: warning: no previous prototype for 'nsim_dcb_getapp' [-Wmissing-prototypes]
521 | int nsim_dcb_getapp(struct net_device *dev, u8 sel, u16 pid)
| ^~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:527:4: warning: no previous prototype for 'nsim_dcb_getfeatcfg' [-Wmissing-prototypes]
527 | u8 nsim_dcb_getfeatcfg(struct net_device *dev, int feat_id, u8 *flags)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:533:4: warning: no previous prototype for 'nsim_dcb_setfeatcfg' [-Wmissing-prototypes]
533 | u8 nsim_dcb_setfeatcfg(struct net_device *dev, int feat_id, u8 flags)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:539:4: warning: no previous prototype for 'nsim_dcb_getdcbx' [-Wmissing-prototypes]
539 | u8 nsim_dcb_getdcbx(struct net_device *dev)
| ^~~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:546:4: warning: no previous prototype for 'nsim_dcb_setdcbx' [-Wmissing-prototypes]
546 | u8 nsim_dcb_setdcbx(struct net_device *dev, u8 mode)
| ^~~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:554:5: warning: no previous prototype for 'nsim_dcb_peer_getappinfo' [-Wmissing-prototypes]
554 | int nsim_dcb_peer_getappinfo(struct net_device *dev, struct dcb_peer_app_info *info, u16 *count)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:560:5: warning: no previous prototype for 'nsim_dcb_peer_getapptable' [-Wmissing-prototypes]
560 | int nsim_dcb_peer_getapptable(struct net_device *dev, struct dcb_app *table)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:566:5: warning: no previous prototype for 'nsim_dcb_cee_peer_getpg' [-Wmissing-prototypes]
566 | int nsim_dcb_cee_peer_getpg(struct net_device *dev, struct cee_pg *pg)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/net/netdevsim/netdev.c:572:5: warning: no previous prototype for 'nsim_dcb_cee_peer_getpfc' [-Wmissing-prototypes]
572 | int nsim_dcb_cee_peer_getpfc(struct net_device *dev, struct cee_pfc *pfc)
| ^~~~~~~~~~~~~~~~~~~~~~~~


vim +/nsim_dcb_dcbnl_getbuffer +291 drivers/net/netdevsim/netdev.c

290
> 291 int nsim_dcb_dcbnl_getbuffer(struct net_device *dev, struct dcbnl_buffer *buf)
292 {
293 struct netdevsim *ns = netdev_priv(dev);
294
295 printk(KERN_WARNING "nsim_dcb_dcbnl_getbuffer\n");
296
297 nsim_dcb_dcbnl_buffer_update_total_size(&ns->buffer);
298 *buf = ns->buffer;
299 return 0;
300 }
301
> 302 int nsim_dcb_dcbnl_setbuffer(struct net_device *dev, struct dcbnl_buffer *buf)
303 {
304 struct netdevsim *ns = netdev_priv(dev);
305
306 printk(KERN_WARNING "nsim_dcb_dcbnl_setbuffer\n");
307 ns->buffer = *buf;
308 return 0;
309 }
310
> 311 int nsim_dcb_ieee_getets(struct net_device *dev, struct ieee_ets *ets)
312 {
313 struct netdevsim *ns = netdev_priv(dev);
314
315 printk(KERN_WARNING "nsim_dcb_ieee_getets\n");
316 *ets = ns->ets;
317 return 0;
318 }
319
> 320 int nsim_dcb_ieee_setets(struct net_device *dev, struct ieee_ets *ets)
321 {
322 struct netdevsim *ns = netdev_priv(dev);
323
324 printk(KERN_WARNING "nsim_dcb_ieee_setets\n");
325 ns->ets = *ets;
326 return 0;
327 }
328
> 329 int nsim_dcb_ieee_getmaxrate(struct net_device *dev, struct ieee_maxrate *maxrate)
330 {
331 struct netdevsim *ns = netdev_priv(dev);
332
333 printk(KERN_WARNING "nsim_dcb_ieee_getmaxrate\n");
334 *maxrate = ns->maxrate;
335 return 0;
336 }
337
> 338 int nsim_dcb_ieee_setmaxrate(struct net_device *dev, struct ieee_maxrate *maxrate)
339 {
340 struct netdevsim *ns = netdev_priv(dev);
341
342 printk(KERN_WARNING "nsim_dcb_ieee_setmaxrate\n");
343 ns->maxrate = *maxrate;
344 return 0;
345 }
346
> 347 int nsim_dcb_ieee_getpfc(struct net_device *dev, struct ieee_pfc *pfc)
348 {
349 struct netdevsim *ns = netdev_priv(dev);
350 int i;
351
352 printk(KERN_WARNING "nsim_dcb_ieee_getpfc\n");
353
354 ns->pfc.requests[0] += 1;
355 for (i = 1; i < IEEE_8021QAZ_MAX_TCS; i++)
356 ns->pfc.requests[i] += ns->pfc.requests[i - 1];
357
358 ns->pfc.indications[0] += ns->pfc.requests[IEEE_8021QAZ_MAX_TCS - 1];
359 for (i = 1; i < IEEE_8021QAZ_MAX_TCS; i++)
360 ns->pfc.indications[i] += ns->pfc.indications[i - 1];
361
362 *pfc = ns->pfc;
363 return 0;
364 }
365
> 366 int nsim_dcb_ieee_setpfc(struct net_device *dev, struct ieee_pfc *pfc)
367 {
368 struct netdevsim *ns = netdev_priv(dev);
369
370 printk(KERN_WARNING "nsim_dcb_ieee_setpfc\n");
371
372 memcpy(pfc->indications, ns->pfc.indications, sizeof(pfc->indications));
373 memcpy(pfc->requests, ns->pfc.requests, sizeof(pfc->requests));
374 ns->pfc = *pfc;
375
376 return 0;
377 }
378
> 379 int nsim_dcb_ieee_getqcn(struct net_device *dev, struct ieee_qcn *qcn)
380 {
381 printk(KERN_WARNING "nsim_dcb_ieee_getqcn\n");
382 return -EOPNOTSUPP;
383 }
384
> 385 int nsim_dcb_ieee_setqcn(struct net_device *dev, struct ieee_qcn *qcn)
386 {
387 printk(KERN_WARNING "nsim_dcb_ieee_setqcn\n");
388 return -EOPNOTSUPP;
389 }
390
> 391 int nsim_dcb_ieee_getqcnstats(struct net_device *dev, struct ieee_qcn_stats *qcn_stats)
392 {
393 printk(KERN_WARNING "nsim_dcb_ieee_getqcnstats\n");
394 return -EOPNOTSUPP;
395 }
396
> 397 int nsim_dcb_ieee_peer_getets(struct net_device *dev, struct ieee_ets *ets)
398 {
399 printk(KERN_WARNING "nsim_dcb_ieee_peer_getets\n");
400 return -EOPNOTSUPP;
401 }
402
> 403 int nsim_dcb_ieee_peer_getpfc(struct net_device *dev, struct ieee_pfc *pfc)
404 {
405 printk(KERN_WARNING "nsim_dcb_ieee_peer_getpfc\n");
406 return -EOPNOTSUPP;
407 }
408
> 409 u8 nsim_dcb_getstate(struct net_device *dev)
410 {
411 printk(KERN_WARNING "nsim_dcb_getstate\n");
412 return -EOPNOTSUPP;
413 }
414
> 415 u8 nsim_dcb_setstate(struct net_device *dev, u8 enabled)
416 {
417 printk(KERN_WARNING "nsim_dcb_setstate\n");
418 return -EOPNOTSUPP;
419 }
420
> 421 void nsim_dcb_getpermhwaddr(struct net_device *dev, u8 *perm_addr)
422 {
423 printk(KERN_WARNING "nsim_dcb_getpermhwaddr\n");
424 }
425
> 426 void nsim_dcb_setpgtccfgtx(struct net_device *dev, int prio, u8 prio_type,
427 u8 pgid, u8 bw_pct, u8 up_map)
428 {
429 printk(KERN_WARNING "nsim_dcb_setpgtccfgtx\n");
430 }
431
> 432 void nsim_dcb_setpgbwgcfgtx(struct net_device *dev, int pgid, u8 bw_pct)
433 {
434 printk(KERN_WARNING "nsim_dcb_setpgbwgcfgtx\n");
435 }
436
> 437 void nsim_dcb_setpgtccfgrx(struct net_device *dev, int prio, u8 prio_type,
438 u8 pgid, u8 bw_pct, u8 up_map)
439 {
440 printk(KERN_WARNING "nsim_dcb_setpgtccfgrx\n");
441 }
442
> 443 void nsim_dcb_setpgbwgcfgrx(struct net_device *dev, int pgid, u8 bw_pct)
444 {
445 printk(KERN_WARNING "nsim_dcb_setpgbwgcfgrx\n");
446 }
447
> 448 void nsim_dcb_getpgtccfgtx(struct net_device *dev, int tc, u8 *prio_type,
449 u8 *pgid, u8 *bw_pct, u8 *up_map)
450 {
451 printk(KERN_WARNING "nsim_dcb_getpgtccfgtx\n");
452 }
453
> 454 void nsim_dcb_getpgbwgcfgtx(struct net_device *dev, int pgid, u8 *bw_pct)
455 {
456 printk(KERN_WARNING "nsim_dcb_getpgbwgcfgtx\n");
457 }
458
> 459 void nsim_dcb_getpgtccfgrx(struct net_device *dev, int tc, u8 *prio,
460 u8 *pgid, u8 *bw_pct, u8 *up_map)
461 {
462 printk(KERN_WARNING "nsim_dcb_getpgtccfgrx\n");
463 }
464
> 465 void nsim_dcb_getpgbwgcfgrx(struct net_device *dev, int pg_id, u8 *bw_pct)
466 {
467 printk(KERN_WARNING "nsim_dcb_getpgbwgcfgrx\n");
468 }
469
> 470 void nsim_dcb_setpfccfg(struct net_device *dev, int prio, u8 enabled)
471 {
472 printk(KERN_WARNING "nsim_dcb_setpfccfg\n");
473 }
474
> 475 void nsim_dcb_getpfccfg(struct net_device *dev, int prio, u8 *enabled)
476 {
477 printk(KERN_WARNING "nsim_dcb_getpfccfg\n");
478 }
479
> 480 u8 nsim_dcb_setall(struct net_device *dev)
481 {
482 printk(KERN_WARNING "nsim_dcb_setall\n");
483 return 0;
484 }
485
> 486 u8 nsim_dcb_getcap(struct net_device *dev, int capid, u8 *cap)
487 {
488 printk(KERN_WARNING "nsim_dcb_getcap\n");
489 return 0;
490 }
491

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip