mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "himanshujha199640@gmail.com" <himanshujha199640@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH] skd: Use kmem_cache_free
Date: Mon, 9 Oct 2017 17:33:54 +0000	[thread overview]
Message-ID: <1507570433.2674.18.camel@wdc.com> (raw)
In-Reply-To: <1507498228-11878-1-git-send-email-himanshujha199640@gmail.com>

On Mon, 2017-10-09 at 03:00 +0530, Himanshu Jha wrote:
> Use kmem_cache_free instead of kfree for freeing the memory previously
> allocated with kmem_cache_zalloc/kmem_cache_alloc/kmem_cache_node.
> 
> Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
> ---
>  drivers/block/skd_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
> index 7cedb42..64d0fc1 100644
> --- a/drivers/block/skd_main.c
> +++ b/drivers/block/skd_main.c
> @@ -2604,7 +2604,7 @@ static void *skd_alloc_dma(struct skd_device *skdev, struct kmem_cache *s,
>  		return NULL;
>  	*dma_handle = dma_map_single(dev, buf, s->size, dir);
>  	if (dma_mapping_error(dev, *dma_handle)) {
> -		kfree(buf);
> +		kmem_cache_free(s, buf);
>  		buf = NULL;
>  	}
>  	return buf;

Thanks for this patch.

Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>

      parent reply	other threads:[~2017-10-09 17:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-08 21:30 Himanshu Jha
2017-10-09 14:31 ` Jens Axboe
2017-10-09 17:33 ` Bart Van Assche [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 \
    --in-reply-to=1507570433.2674.18.camel@wdc.com \
    --to=bart.vanassche@wdc.com \
    --cc=himanshujha199640@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

Powered by JetHome