[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1499475510.20988.12.camel@perches.com>
Date: Fri, 07 Jul 2017 17:58:30 -0700
From: Joe Perches <joe@...ches.com>
To: Amitoj Kaur Chawla <amitoj1606@...il.com>, mchehab@...nel.org,
gregkh@...uxfoundation.org, linux-media@...r.kernel.org,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] staging: media: atomisp2: css2400: Replace
kfree()/vfree() with kvfree()
On Fri, 2017-07-07 at 20:40 -0400, Amitoj Kaur Chawla wrote:
> Conditionally calling kfree()/vfree() can be replaced by a call to
> kvfree() which handles both kmalloced memory and vmalloced memory.
[]
> diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c
[]
> @@ -2029,10 +2029,7 @@ void *sh_css_calloc(size_t N, size_t size)
>
> void sh_css_free(void *ptr)
> {
> - if (is_vmalloc_addr(ptr))
> - vfree(ptr);
> - else
> - kfree(ptr);
> + kvfree(ptr);
> }
Why not just get rid of sh_css_free and use kvfree directly?
Why not get rid of all the sh_css_<alloc/free> functions?
Powered by blists - more mailing lists