[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7427ccc1-c830-56c1-1577-dee5afff3809@kernel.dk>
Date: Thu, 12 May 2022 06:21:19 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Wan Jiabing <wanjiabing@...o.com>,
Pavel Begunkov <asml.silence@...il.com>,
io-uring@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] io_uring: Fix incorrect variable type in
io_fixed_fd_install
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
Powered by blists - more mailing lists