mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Oleg Nesterov <oleg@redhat.com>
Subject: kernel/task_work.c:73: warning: Function parameter or member 'data' not described in 'task_work_cancel_match'
Date: Tue, 12 Sep 2023 03:12:35 +0800	[thread overview]
Message-ID: <202309120307.zis3yQGe-lkp@intel.com> (raw)

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

             reply	other threads:[~2023-09-11 22:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-11 19:12 kernel test robot [this message]
2023-09-11 19:29 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202309120307.zis3yQGe-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oleg@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®