linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pavel Begunkov <asml.silence@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Jens Axboe <axboe@kernel.dk>
Subject: [block:for-5.15/io_uring-late 5/10] fs/io_uring.c:1429:61: warning: parameter 'locked' set but not used
Date: Mon, 23 Aug 2021 13:39:18 +0800	[thread overview]
Message-ID: <202108231310.6pI1RKs7-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2825 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-5.15/io_uring-late
head:   7183e74cadee8d9a65f2dbd23d41006e96ecb26e
commit: 984a7d0be18d007162655ae84db6f54d2449ed2d [5/10] io_uring: batch task work locking
config: nios2-defconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?id=984a7d0be18d007162655ae84db6f54d2449ed2d
        git remote add block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
        git fetch --no-tags block for-5.15/io_uring-late
        git checkout 984a7d0be18d007162655ae84db6f54d2449ed2d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2 

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

All warnings (new ones prefixed by >>):

   fs/io_uring.c: In function 'io_queue_async_work':
>> fs/io_uring.c:1429:61: warning: parameter 'locked' set but not used [-Wunused-but-set-parameter]
    1429 | static void io_queue_async_work(struct io_kiocb *req, bool *locked)
         |                                                       ~~~~~~^~~~~~


vim +/locked +1429 fs/io_uring.c

  1428	
> 1429	static void io_queue_async_work(struct io_kiocb *req, bool *locked)
  1430	{
  1431		struct io_ring_ctx *ctx = req->ctx;
  1432		struct io_kiocb *link = io_prep_linked_timeout(req);
  1433		struct io_uring_task *tctx = req->task->io_uring;
  1434	
  1435		/* must not take the lock, NULL it as a precaution */
  1436		locked = NULL;
  1437	
  1438		BUG_ON(!tctx);
  1439		BUG_ON(!tctx->io_wq);
  1440	
  1441		/* init ->work of the whole link before punting */
  1442		io_prep_async_link(req);
  1443	
  1444		/*
  1445		 * Not expected to happen, but if we do have a bug where this _can_
  1446		 * happen, catch it here and ensure the request is marked as
  1447		 * canceled. That will make io-wq go through the usual work cancel
  1448		 * procedure rather than attempt to run this request (or create a new
  1449		 * worker for it).
  1450		 */
  1451		if (WARN_ON_ONCE(!same_thread_group(req->task, current)))
  1452			req->work.flags |= IO_WQ_WORK_CANCEL;
  1453	
  1454		trace_io_uring_queue_async_work(ctx, io_wq_is_hashed(&req->work), req,
  1455						&req->work, req->flags);
  1456		io_wq_enqueue(tctx->io_wq, &req->work);
  1457		if (link)
  1458			io_queue_linked_timeout(link);
  1459	}
  1460	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 10086 bytes --]

                 reply	other threads:[~2021-08-23  5:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202108231310.6pI1RKs7-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).