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

2017-07-08 Thread Amitoj Kaur Chawla
On Sat, Jul 8, 2017 at 4:58 AM, Bernd Petrovitsch 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 >> @@

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

2017-07-08 Thread Amitoj Kaur Chawla
On Sat, Jul 8, 2017 at 4:58 AM, Bernd Petrovitsch 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

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

2017-07-08 Thread Bernd Petrovitsch
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

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

2017-07-08 Thread Bernd Petrovitsch
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

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

2017-07-07 Thread Amitoj Kaur Chawla
Conditionally calling kfree()/vfree() can be replaced by a call to kvfree() which handles both kmalloced memory and vmalloced memory. Consequently removed an unnecessary comment. The Coccinelle semantic patch used to make the change is as follows: // @@ expression a; @@ - if(...) { vfree(a); }

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

2017-07-07 Thread Amitoj Kaur Chawla
Conditionally calling kfree()/vfree() can be replaced by a call to kvfree() which handles both kmalloced memory and vmalloced memory. Consequently removed an unnecessary comment. The Coccinelle semantic patch used to make the change is as follows: // @@ expression a; @@ - if(...) { vfree(a); }