public inbox for linux-kernel@vger.kernel.org
 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: fs/io_uring.c:5999:2: warning: Redundant assignment of 'req' to itself. [selfAssignment]
Date: Wed, 16 Feb 2022 19:24:24 +0800	[thread overview]
Message-ID: <202202161925.Sd1RTERz-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c5d9ae265b105d9a67575fb67bd4650a6fc08e25
commit: a3dbdf54da80326fd12bc11ad75ecd699a82374f io_uring: refactor io_get_sequence()
date:   8 months ago
compiler: powerpc64-linux-gcc (GCC) 11.2.0

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


cppcheck warnings: (new ones prefixed by >>)
>> kernel/irq/proc.c:357:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
    sprintf(name, "%d", irq);
    ^
>> fs/io_uring.c:5999:2: warning: Redundant assignment of 'req' to itself. [selfAssignment]
    io_for_each_link(req, req)
    ^

cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> kernel/irq/proc.c:357:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
    sprintf(name, "%d", irq);
    ^
>> fs/io_uring.c:5305:19: warning: Uninitialized variable: req [uninitvar]
     if (sqe_addr != req->user_data)
                     ^
   fs/io_uring.c:5309:10: warning: Uninitialized variable: req [uninitvar]
     return req;
            ^
   fs/io_uring.c:9491:46: warning: Uninitialized variable: req [uninitvar]
      seq_printf(m, "  op=%d, task_works=%dn", req->opcode,
                                                ^
   fs/io_uring.c:9492:6: warning: Uninitialized variable: req [uninitvar]
        req->task->task_works != NULL);
        ^

vim +/req +5999 fs/io_uring.c

  5993	
  5994	static u32 io_get_sequence(struct io_kiocb *req)
  5995	{
  5996		u32 seq = req->ctx->cached_sq_head;
  5997	
  5998		/* need original cached_sq_head, but it was increased for each req */
> 5999		io_for_each_link(req, req)
  6000			seq--;
  6001		return seq;
  6002	}
  6003	

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

                 reply	other threads:[~2022-02-16 11:24 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=202202161925.Sd1RTERz-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