Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1683669

Re: [PATCH 2/2] staging: media: atomisp2: Replace kfree()/vfree() with kvfree()

From Amitoj Kaur Chawla <amitoj1606@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] staging: media: atomisp2: Replace kfree()/vfree() with kvfree()
Date 2017-07-09 01:00 +0200
Message-ID <u16RH-87c-9@gated-at.bofh.it> (permalink)
References <u0M6C-3qm-7@gated-at.bofh.it> <u0TKN-8pp-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Jul 8, 2017 at 4:58 AM, Bernd Petrovitsch
<bernd@petrovitsch.priv.at> wrote:
> 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?
>

Oh yes, i'll send a v2.

Amitoj

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] staging: media: atomisp2: Replace kfree()/vfree() with  kvfree() Amitoj Kaur Chawla <amitoj1606@gmail.com> - 2017-07-08 02:50 +0200
  Re: [PATCH 2/2] staging: media: atomisp2: Replace kfree()/vfree()  with kvfree() Bernd Petrovitsch <bernd@petrovitsch.priv.at> - 2017-07-08 11:00 +0200
    Re: [PATCH 2/2] staging: media: atomisp2: Replace kfree()/vfree()  with kvfree() Amitoj Kaur Chawla <amitoj1606@gmail.com> - 2017-07-09 01:00 +0200

csiph-web