[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1499504311.3472.13.camel@petrovitsch.priv.at>
Date: Sat, 08 Jul 2017 10:58:31 +0200
From: Bernd Petrovitsch <bernd@...rovitsch.priv.at>
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 2/2] staging: media: atomisp2: Replace kfree()/vfree()
with kvfree()
On Fri, 2017-07-07 at 20:41 -0400, Amitoj Kaur Chawla wrote:
[...]
> --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
> +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
> @@ -117,11 +117,7 @@ void *atomisp_kernel_zalloc(size_t bytes, bool
> zero_mem)
> */
> void atomisp_kernel_free(void *ptr)
> {
> - /* Verify if buffer was allocated by vmalloc() or kmalloc()
> */
> - if (is_vmalloc_addr(ptr))
> - vfree(ptr);
> - else
> - kfree(ptr);
> + kvfree(ptr);
> }
>
> /*
Why not get rid of the trivial wrapper function completely?
MfG,
Bernd
--
Bernd Petrovitsch Email : bernd@...rovitsch.priv.at
LUGA : http://www.luga.at
Powered by blists - more mailing lists