From: Kyle Fortin <kyle.fortin@oracle.com>
To: Tim Hansen <devtimhansen@gmail.com>
Cc: axboe@kernel.dk, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, alexander.levin@one.verizon.com
Subject: Re: [PATCH] block: remove unnecessary NULL checks in bioset_integrity_free()
Date: Fri, 6 Oct 2017 12:00:46 -0400 [thread overview]
Message-ID: <5619DDDF-453D-44DD-BDEB-B87DF0A18271@oracle.com> (raw)
In-Reply-To: <20171005180920.GA121296@debian>
Hi Tim,
On Oct 5, 2017, at 2:09 PM, Tim Hansen <devtimhansen@gmail.com> wrote:
>
> mempool_destroy() already checks for a NULL value being passed in, this eliminates duplicate checks.
>
> This was caught by running make coccicheck M=block/ on linus' tree on commit 77ede3a014a32746002f7889211f0cecf4803163 (current head as of this patch).
>
> Signed-off-by: Tim Hansen <devtimhansen@gmail.com>
> ---
> block/bio-integrity.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/block/bio-integrity.c b/block/bio-integrity.c
> index 5df3290..23b42e8 100644
> --- a/block/bio-integrity.c
> +++ b/block/bio-integrity.c
> @@ -485,11 +485,8 @@ EXPORT_SYMBOL(bioset_integrity_create);
>
> void bioset_integrity_free(struct bio_set *bs)
> {
> - if (bs->bio_integrity_pool)
> - mempool_destroy(bs->bio_integrity_pool);
> -
> - if (bs->bvec_integrity_pool)
> - mempool_destroy(bs->bvec_integrity_pool);
> + mempool_destroy(bs->bio_integrity_pool);
> + mempool_destroy(bs->bvec_integrity_pool);
> }
> EXPORT_SYMBOL(bioset_integrity_free);
>
> --
> 2.1.4
Looks good.
Reviewed-by: Kyle Fortin <kyle.fortin@oracle.com>
next prev parent reply other threads:[~2017-10-06 16:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-05 18:09 Tim Hansen
2017-10-06 16:00 ` Kyle Fortin [this message]
2017-10-06 18:40 ` Martin K. Petersen
2017-10-06 19:04 ` Jens Axboe
2017-10-06 22:26 ` Tim Hansen
2017-10-09 18:34 ` Kyle Fortin
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=5619DDDF-453D-44DD-BDEB-B87DF0A18271@oracle.com \
--to=kyle.fortin@oracle.com \
--cc=alexander.levin@one.verizon.com \
--cc=axboe@kernel.dk \
--cc=devtimhansen@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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®