Re: [Cocci] [PATCH] Coccinelle: kzalloc-simple: Add all zero allocating functions

2017-12-26 Thread Himanshu Jha
On Tue, Dec 26, 2017 at 06:14:07PM -0200, Fabio Estevam wrote: > On Tue, Dec 26, 2017 at 5:49 PM, Himanshu Jha > wrote: > > > diff --git a/scripts/coccinelle/api/alloc/kzalloc-simple.cocci > > b/scripts/coccinelle/api/alloc/kzalloc-simple.cocci > > index 52c55e4..f94888d 100644 > > --- a/scripts

Re: [Cocci] [PATCH] Coccinelle: kzalloc-simple: Add all zero allocating functions

2017-12-26 Thread Fabio Estevam
On Tue, Dec 26, 2017 at 5:49 PM, Himanshu Jha wrote: > diff --git a/scripts/coccinelle/api/alloc/kzalloc-simple.cocci > b/scripts/coccinelle/api/alloc/kzalloc-simple.cocci > index 52c55e4..f94888d 100644 > --- a/scripts/coccinelle/api/alloc/kzalloc-simple.cocci > +++ b/scripts/coccinelle/api/all

[PATCH] Coccinelle: kzalloc-simple: Add all zero allocating functions

2017-12-26 Thread Himanshu Jha
There are many instances where memory is allocated using regular allocator functions immediately followed by setting the allocated memory to 0 value using memset. We already have zero memory allocator functions to set the memory to 0 value instead of manually setting it using memset. Therefore, u

Re: [PATCH] Coccinelle: kzalloc-simple: Add all zero allocating functions

2017-12-24 Thread Julia Lawall
On Sun, 24 Dec 2017, Himanshu Jha wrote: > There are many instances where memory is allocated using regular allocator > functions immediately followed by setting the allocated memory > to 0 value using memset. > > We already have zero memory allocator functions to set the memory to > 0 value ins

[PATCH] Coccinelle: kzalloc-simple: Add all zero allocating functions

2017-12-24 Thread Himanshu Jha
There are many instances where memory is allocated using regular allocator functions immediately followed by setting the allocated memory to 0 value using memset. We already have zero memory allocator functions to set the memory to 0 value instead of manually setting it using memset. Therefore, u