From: Jens Axboe <axboe@kernel.dk>
To: Wan Jiabing <wanjiabing@vivo.com>,
Pavel Begunkov <asml.silence@gmail.com>,
io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] io_uring: Fix incorrect variable type in io_fixed_fd_install
Date: Thu, 12 May 2022 06:21:19 -0600 [thread overview]
Message-ID: <7427ccc1-c830-56c1-1577-dee5afff3809@kernel.dk> (raw)
In-Reply-To: <20220512120511.4306-1-wanjiabing@vivo.com>
On 5/12/22 6:05 AM, Wan Jiabing wrote:
> Fix following coccicheck warning:
> fs/io_uring.c:5352:15-24: WARNING: Unsigned expression compared with zero: file_slot < 0
>
> 'file_slot' is an unsigned variable and it can't be less than 0.
> Use 'ret' instead to check the error code from io_file_bitmap_get().
>
> And using bool to declare 'alloc_slot' makes the code better.
Thanks, I'm going to fold this one in.
--
Jens Axboe
prev parent reply other threads:[~2022-05-12 12:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-12 12:05 Wan Jiabing
2022-05-12 12:21 ` Jens Axboe [this message]
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=7427ccc1-c830-56c1-1577-dee5afff3809@kernel.dk \
--to=axboe@kernel.dk \
--cc=asml.silence@gmail.com \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wanjiabing@vivo.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®