Re: kernel/task_work.c:73: warning: Function parameter or member 'data' not described in 'task_work_cancel_match'

From: Jens Axboe
Date: Mon Sep 11 2023 - 17:39:41 EST


On 9/11/23 1:12 PM, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d
> commit: c7aab1a7c52b82d9afd7e03c398eb03dc2aa0507 task_work: add helper for more targeted task_work canceling
> date: 2 years, 5 months ago
> config: openrisc-allnoconfig (https://download.01.org/0day-ci/archive/20230912/202309120307.zis3yQGe-lkp@xxxxxxxxx/config)
> compiler: or1k-linux-gcc (GCC) 12.3.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230912/202309120307.zis3yQGe-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/202309120307.zis3yQGe-lkp@xxxxxxxxx/
>
> All warnings (new ones prefixed by >>):
>
>>> kernel/task_work.c:73: warning: Function parameter or member 'data' not described in 'task_work_cancel_match'

Wow, that got introduced with:

commit c7aab1a7c52b82d9afd7e03c398eb03dc2aa0507
Author: Jens Axboe <axboe@xxxxxxxxx>
Date: Thu Apr 1 19:53:29 2021 -0600

task_work: add helper for more targeted task_work canceling

which is a while ago. In any case, this should fix it. I'll send out a
proper patch.


diff --git a/kernel/task_work.c b/kernel/task_work.c
index 065e1ef8fc8d..2a628b4a6124 100644
--- a/kernel/task_work.c
+++ b/kernel/task_work.c
@@ -78,6 +78,7 @@ int task_work_add(struct task_struct *task, struct callback_head *work,
* task_work_cancel_match - cancel a pending work added by task_work_add()
* @task: the task which should execute the work
* @match: match function to call
+ * @data: data to pass into match function
*
* RETURNS:
* The found work or NULL if not found.

--
Jens Axboe