[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f0c13c14-f036-594a-7e5b-356eb6adceaf@gmail.com>
Date: Tue, 15 Jun 2021 14:37:29 +0100
From: Pavel Begunkov <asml.silence@...il.com>
To: Zheng Yongjun <zhengyongjun3@...wei.com>, axboe@...nel.dk,
io-uring@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] io_uring: Remove unneeded if-null-free check
On 6/2/21 7:54 AM, Zheng Yongjun wrote:
> Eliminate the following coccicheck warning:
>
> fs/io_uring.c:6056:4-9: WARNING: NULL check before some freeing functions is not needed.
> fs/io_uring.c:1744:2-7: WARNING: NULL check before some freeing functions is not needed.
> fs/io_uring.c:3340:2-7: WARNING: NULL check before some freeing functions is not needed.
> fs/io_uring.c:4612:2-7: WARNING: NULL check before some freeing functions is not needed.
> fs/io_uring.c:4375:2-7: WARNING: NULL check before some freeing functions is not needed.
> fs/io_uring.c:3441:2-7: WARNING: NULL check before some freeing functions is not needed.
Take a look at the comments right above changed lines.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@...wei.com>
> ---
> fs/io_uring.c | 18 ++++++------------
> 1 file changed, 6 insertions(+), 12 deletions(-)
[...]
> /* it's reportedly faster than delegating the null check to kfree() */
> - if (iovec)
> - kfree(iovec);
> + kfree(iovec);
[...]
--
Pavel Begunkov
Powered by blists - more mailing lists