From: Richard Weinberger <richard@nod.at>
To: Julia Lawall <Julia.Lawall@lip6.fr>,
Artem Bityutskiy <dedekind1@gmail.com>
Cc: sergey.senozhatsky@gmail.com, kernel-janitors@vger.kernel.org,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 23/39] UBI: drop null test before destroy functions
Date: Sat, 3 Oct 2015 20:36:24 +0200 [thread overview]
Message-ID: <56102028.70501@nod.at> (raw)
In-Reply-To: <1442146532-9100-24-git-send-email-Julia.Lawall@lip6.fr>
Am 13.09.2015 um 14:15 schrieb Julia Lawall:
> Remove unneeded NULL test.
>
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@ expression x; @@
> -if (x != NULL)
> \(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x);
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> drivers/mtd/ubi/attach.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c
> index 68eea5b..c1aaf03 100644
> --- a/drivers/mtd/ubi/attach.c
> +++ b/drivers/mtd/ubi/attach.c
> @@ -1209,9 +1209,7 @@ static void destroy_ai(struct ubi_attach_info *ai)
> }
> }
>
> - if (ai->aeb_slab_cache)
> - kmem_cache_destroy(ai->aeb_slab_cache);
> -
> + kmem_cache_destroy(ai->aeb_slab_cache);
> kfree(ai);
> }
Applied!
Thanks,
//richard
next prev parent reply other threads:[~2015-10-03 18:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-13 12:14 [PATCH 00/39] drop null test before destroy functions Julia Lawall
2015-09-13 12:14 ` [PATCH 01/39] mtd: nandsim: " Julia Lawall
2015-09-22 0:07 ` Brian Norris
2015-09-13 12:15 ` [PATCH 23/39] UBI: " Julia Lawall
2015-10-03 18:36 ` Richard Weinberger [this message]
2015-09-13 12:15 ` [PATCH 36/39] jffs2: " Julia Lawall
2015-09-14 11:55 ` [PATCH 00/39] " SF Markus Elfring
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=56102028.70501@nod.at \
--to=richard@nod.at \
--cc=Julia.Lawall@lip6.fr \
--cc=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=sergey.senozhatsky@gmail.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;
as well as URLs for NNTP newsgroup(s).