mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [axboe-block:for-5.18/io_uring 19/25] fs/io_uring.c:4338:42-56: duplicated argument to && or || (fwd)
@ 2022-03-12 13:41 Julia Lawall
  2022-03-12 13:52 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2022-03-12 13:41 UTC (permalink / raw)
  To: Jens Axboe; +Cc: kbuild-all, linux-kernel

sqe->buf_index appears twice.

---------- Forwarded message ----------
Date: Sat, 12 Mar 2022 03:22:42 +0800
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Cc: lkp@intel.com, Julia Lawall <julia.lawall@lip6.fr>
Subject: [axboe-block:for-5.18/io_uring 19/25] fs/io_uring.c:4338:42-56:
    duplicated argument to && or ||

CC: kbuild-all@lists.01.org
BCC: lkp@intel.com
CC: linux-kernel@vger.kernel.org
TO: Jens Axboe <axboe@kernel.dk>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-5.18/io_uring
head:   bcbb7bf6ccde7cb969a5642879832bc84ebf06a3
commit: 4f57f06ce2186c31c3da52386125dc57b1cd6f96 [19/25] io_uring: add support for IORING_OP_MSG_RING command
:::::: branch date: 23 hours ago
:::::: commit date: 27 hours ago
config: csky-randconfig-c004-20220310 (https://download.01.org/0day-ci/archive/20220312/202203120306.eNEnYxKX-lkp@intel.com/config)
compiler: csky-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>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


cocci warnings: (new ones prefixed by >>)
>> fs/io_uring.c:4338:42-56: duplicated argument to && or ||

vim +4338 fs/io_uring.c

2b188cc1bb857a Jens Axboe 2019-01-07  4334
4f57f06ce2186c Jens Axboe 2022-03-10  4335  static int io_msg_ring_prep(struct io_kiocb *req,
4f57f06ce2186c Jens Axboe 2022-03-10  4336  			    const struct io_uring_sqe *sqe)
4f57f06ce2186c Jens Axboe 2022-03-10  4337  {
4f57f06ce2186c Jens Axboe 2022-03-10 @4338  	if (unlikely(sqe->addr || sqe->ioprio || sqe->buf_index ||
4f57f06ce2186c Jens Axboe 2022-03-10  4339  		     sqe->rw_flags || sqe->splice_fd_in || sqe->buf_index ||
4f57f06ce2186c Jens Axboe 2022-03-10  4340  		     sqe->personality))
4f57f06ce2186c Jens Axboe 2022-03-10  4341  		return -EINVAL;
4f57f06ce2186c Jens Axboe 2022-03-10  4342
4f57f06ce2186c Jens Axboe 2022-03-10  4343  	if (req->file->f_op != &io_uring_fops)
4f57f06ce2186c Jens Axboe 2022-03-10  4344  		return -EBADFD;
4f57f06ce2186c Jens Axboe 2022-03-10  4345
4f57f06ce2186c Jens Axboe 2022-03-10  4346  	req->msg.user_data = READ_ONCE(sqe->off);
4f57f06ce2186c Jens Axboe 2022-03-10  4347  	req->msg.len = READ_ONCE(sqe->len);
4f57f06ce2186c Jens Axboe 2022-03-10  4348  	return 0;
4f57f06ce2186c Jens Axboe 2022-03-10  4349  }
4f57f06ce2186c Jens Axboe 2022-03-10  4350

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

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

* Re: [axboe-block:for-5.18/io_uring 19/25] fs/io_uring.c:4338:42-56: duplicated argument to && or || (fwd)
  2022-03-12 13:41 [axboe-block:for-5.18/io_uring 19/25] fs/io_uring.c:4338:42-56: duplicated argument to && or || (fwd) Julia Lawall
@ 2022-03-12 13:52 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2022-03-12 13:52 UTC (permalink / raw)
  To: Julia Lawall; +Cc: kbuild-all, linux-kernel

On 3/12/22 6:41 AM, Julia Lawall wrote:
> sqe->buf_index appears twice.

Thanks, fixed up.

-- 
Jens Axboe


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

end of thread, other threads:[~2022-03-12 13:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-12 13:41 [axboe-block:for-5.18/io_uring 19/25] fs/io_uring.c:4338:42-56: duplicated argument to && or || (fwd) Julia Lawall
2022-03-12 13:52 ` 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®