* kernel/task_work.c:73: warning: Function parameter or member 'data' not described in 'task_work_cancel_match'
@ 2023-09-11 19:12 kernel test robot
2023-09-11 19:29 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-09-11 19:12 UTC (permalink / raw)
To: Jens Axboe; +Cc: oe-kbuild-all, linux-kernel, Oleg Nesterov
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@intel.com/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@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309120307.zis3yQGe-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/task_work.c:73: warning: Function parameter or member 'data' not described in 'task_work_cancel_match'
vim +73 kernel/task_work.c
e73f8959af0439 Oleg Nesterov 2012-05-11 60
892f6668f3a708 Oleg Nesterov 2013-09-11 61 /**
c7aab1a7c52b82 Jens Axboe 2021-04-01 62 * task_work_cancel_match - cancel a pending work added by task_work_add()
892f6668f3a708 Oleg Nesterov 2013-09-11 63 * @task: the task which should execute the work
c7aab1a7c52b82 Jens Axboe 2021-04-01 64 * @match: match function to call
892f6668f3a708 Oleg Nesterov 2013-09-11 65 *
892f6668f3a708 Oleg Nesterov 2013-09-11 66 * RETURNS:
892f6668f3a708 Oleg Nesterov 2013-09-11 67 * The found work or NULL if not found.
892f6668f3a708 Oleg Nesterov 2013-09-11 68 */
67d1214551e800 Al Viro 2012-06-27 69 struct callback_head *
c7aab1a7c52b82 Jens Axboe 2021-04-01 70 task_work_cancel_match(struct task_struct *task,
c7aab1a7c52b82 Jens Axboe 2021-04-01 71 bool (*match)(struct callback_head *, void *data),
c7aab1a7c52b82 Jens Axboe 2021-04-01 72 void *data)
e73f8959af0439 Oleg Nesterov 2012-05-11 @73 {
ac3d0da8f3290b Oleg Nesterov 2012-08-26 74 struct callback_head **pprev = &task->task_works;
205e550a0fb469 Oleg Nesterov 2013-09-11 75 struct callback_head *work;
e73f8959af0439 Oleg Nesterov 2012-05-11 76 unsigned long flags;
61e96496d3c949 Oleg Nesterov 2016-08-02 77
61e96496d3c949 Oleg Nesterov 2016-08-02 78 if (likely(!task->task_works))
61e96496d3c949 Oleg Nesterov 2016-08-02 79 return NULL;
ac3d0da8f3290b Oleg Nesterov 2012-08-26 80 /*
ac3d0da8f3290b Oleg Nesterov 2012-08-26 81 * If cmpxchg() fails we continue without updating pprev.
ac3d0da8f3290b Oleg Nesterov 2012-08-26 82 * Either we raced with task_work_add() which added the
ac3d0da8f3290b Oleg Nesterov 2012-08-26 83 * new entry before this work, we will find it again. Or
9da33de62431c7 Oleg Nesterov 2012-08-26 84 * we raced with task_work_run(), *pprev == NULL/exited.
ac3d0da8f3290b Oleg Nesterov 2012-08-26 85 */
e73f8959af0439 Oleg Nesterov 2012-05-11 86 raw_spin_lock_irqsave(&task->pi_lock, flags);
506458efaf153c Will Deacon 2017-10-24 87 while ((work = READ_ONCE(*pprev))) {
c7aab1a7c52b82 Jens Axboe 2021-04-01 88 if (!match(work, data))
ac3d0da8f3290b Oleg Nesterov 2012-08-26 89 pprev = &work->next;
ac3d0da8f3290b Oleg Nesterov 2012-08-26 90 else if (cmpxchg(pprev, work, work->next) == work)
158e1645e07f3e Al Viro 2012-06-27 91 break;
158e1645e07f3e Al Viro 2012-06-27 92 }
e73f8959af0439 Oleg Nesterov 2012-05-11 93 raw_spin_unlock_irqrestore(&task->pi_lock, flags);
ac3d0da8f3290b Oleg Nesterov 2012-08-26 94
ac3d0da8f3290b Oleg Nesterov 2012-08-26 95 return work;
e73f8959af0439 Oleg Nesterov 2012-05-11 96 }
e73f8959af0439 Oleg Nesterov 2012-05-11 97
:::::: The code at line 73 was first introduced by commit
:::::: e73f8959af0439d114847eab5a8a5ce48f1217c4 task_work_add: generic process-context callbacks
:::::: TO: Oleg Nesterov <oleg@redhat.com>
:::::: CC: Al Viro <viro@zeniv.linux.org.uk>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: kernel/task_work.c:73: warning: Function parameter or member 'data' not described in 'task_work_cancel_match'
2023-09-11 19:12 kernel/task_work.c:73: warning: Function parameter or member 'data' not described in 'task_work_cancel_match' kernel test robot
@ 2023-09-11 19:29 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2023-09-11 19:29 UTC (permalink / raw)
To: kernel test robot; +Cc: oe-kbuild-all, linux-kernel, Oleg Nesterov
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@intel.com/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@intel.com/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@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202309120307.zis3yQGe-lkp@intel.com/
>
> 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@kernel.dk>
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-11 22:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11 19:12 kernel/task_work.c:73: warning: Function parameter or member 'data' not described in 'task_work_cancel_match' kernel test robot
2023-09-11 19:29 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®