From: Pavel Begunkov <[email protected]>
To: Zheng Yongjun <[email protected]>,
[email protected], [email protected],
[email protected]
Subject: Re: [PATCH -next] io_uring: Remove unneeded if-null-free check
Date: Tue, 15 Jun 2021 14:37:29 +0100 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
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 <[email protected]>
> ---
> 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
prev parent reply other threads:[~2021-06-15 13:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-02 6:54 [PATCH -next] io_uring: Remove unneeded if-null-free check Zheng Yongjun
2021-06-15 13:37 ` Pavel Begunkov [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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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