All of lore.kernel.org
 help / color / mirror / Atom feed
* [block:for-5.14/io_uring 59/64] fs/io_uring.c:5999:2: warning: Redundant assignment of 'req' to itself. [selfAssignment]
@ 2021-06-18 20:47 kernel test robot
  2021-06-20 20:59 ` Pavel Begunkov
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2021-06-18 20:47 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-5.14/io_uring
head:   7a778f9dc32deae4f748903f6f9169dc01cbcd28
commit: a3dbdf54da80326fd12bc11ad75ecd699a82374f [59/64] io_uring: refactor io_get_sequence()
compiler: hppa-linux-gcc (GCC) 9.3.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 >>)
>> 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)

   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(a)lists.01.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [block:for-5.14/io_uring 59/64] fs/io_uring.c:5999:2: warning: Redundant assignment of 'req' to itself. [selfAssignment]
  2021-06-18 20:47 [block:for-5.14/io_uring 59/64] fs/io_uring.c:5999:2: warning: Redundant assignment of 'req' to itself. [selfAssignment] kernel test robot
@ 2021-06-20 20:59 ` Pavel Begunkov
  0 siblings, 0 replies; 2+ messages in thread
From: Pavel Begunkov @ 2021-06-20 20:59 UTC (permalink / raw)
  To: kbuild-all

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

On 6/18/21 9:47 PM, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-5.14/io_uring
> head:   7a778f9dc32deae4f748903f6f9169dc01cbcd28
> commit: a3dbdf54da80326fd12bc11ad75ecd699a82374f [59/64] io_uring: refactor io_get_sequence()
> compiler: hppa-linux-gcc (GCC) 9.3.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 >>)
>>> 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)
> 
>    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)

Thanks for reporting, it was intentional. May delete it
in the future to not trigger bots.

-- 
Pavel Begunkov

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-20 20:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 20:47 [block:for-5.14/io_uring 59/64] fs/io_uring.c:5999:2: warning: Redundant assignment of 'req' to itself. [selfAssignment] kernel test robot
2021-06-20 20:59 ` Pavel Begunkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.