drivers/hv/channel.c:597: warning: Function parameter or member 'size' not described in 'request_arr_init'

From: kernel test robot
Date: Tue Oct 17 2023 - 15:19:04 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 213f891525c222e8ed145ce1ce7ae1f47921cb9c
commit: f83705a51275ed29117d46e1d68e8b16dcb40507 Driver: VMBus: Add Devicetree support
date: 6 months ago
config: x86_64-buildonly-randconfig-003-20230823 (https://download.01.org/0day-ci/archive/20231018/202310180325.z51l0QSy-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231018/202310180325.z51l0QSy-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310180325.z51l0QSy-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/hv/channel.c:597: warning: Function parameter or member 'size' not described in 'request_arr_init'


vim +597 drivers/hv/channel.c

3e7ee4902fe699 drivers/staging/hv/Channel.c Hank Janssen 2009-07-13 588
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 589 /**
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 590 * request_arr_init - Allocates memory for the requestor array. Each slot
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 591 * keeps track of the next available slot in the array. Initially, each
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 592 * slot points to the next one (as in a Linked List). The last slot
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 593 * does not point to anything, so its value is U64_MAX by default.
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 594 * @size The size of the array
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 595 */
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 596 static u64 *request_arr_init(u32 size)
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 @597 {
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 598 int i;
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 599 u64 *req_arr;
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 600
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 601 req_arr = kcalloc(size, sizeof(u64), GFP_KERNEL);
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 602 if (!req_arr)
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 603 return NULL;
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 604
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 605 for (i = 0; i < size - 1; i++)
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 606 req_arr[i] = i + 1;
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 607
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 608 /* Last slot (no more available slots) */
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 609 req_arr[i] = U64_MAX;
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 610
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 611 return req_arr;
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 612 }
e8b7db38449ac5 drivers/hv/channel.c Andres Beltran 2020-11-09 613

:::::: The code at line 597 was first introduced by commit
:::::: e8b7db38449ac5b950a3f00519171c4be3e226ff Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

:::::: TO: Andres Beltran <lkmlabelt@xxxxxxxxx>
:::::: CC: Wei Liu <wei.liu@xxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki