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

2017-07-07 Thread Joe Perches
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 >

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

2017-07-07 Thread Joe Perches
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 >

[PATCH 1/2] staging: media: atomisp2: css2400: 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. The Coccinelle semantic patch used to make the change is as follows: // @@ expression a; @@ - if(...) { vfree(a); } - else { kfree(a); } + kvfree(a); @@

[PATCH 1/2] staging: media: atomisp2: css2400: 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. The Coccinelle semantic patch used to make the change is as follows: // @@ expression a; @@ - if(...) { vfree(a); } - else { kfree(a); } + kvfree(a); @@