The following is a sketch of how a macro kcalloc could BUILD_BUG_ON for
overflows of two compile-time operands, or call "kcalloc_variable" for
nonconstant arguments. Tested on gcc 4.7.2 only, since it's what I had to
hand. I didn't do any testing beyond checking that fn2 didn't build, and that
fn
This replaces kmalloc + memset by a call to kzalloc
This also fixes one checkpatch.pl issue in the process.
This improvement was suggested by "make coccicheck"
Signed-off-by: Michael Opdenacker
Reviewed-by: Hannes Reinecke
---
drivers/scsi/aic7xxx/aic79xx_core.c | 3 +--
drivers/scsi/aic7xxx
On 03/24/2015 04:16 PM, Elliott, Robert (Server Storage) wrote:
>
> It was a reply to the original post on 2014-10-16, not the resend
> this month.
>
> From http://permalink.gmane.org/gmane.linux.kernel/1808168:
>
> kcalloc is helpful when one of the values is a variable that
> might cause the mu
.org
> Subject: Re: [PATCH] [RESEND] aic7xxx: replace kmalloc/memset by kzalloc
>
> On Tue, 2015-03-24 at 13:46 -0700, Michael Opdenacker wrote:
...
> > On 03/22/2015 11:59 PM, Hannes Reinecke wrote:
> > > On 03/22/2015 05:31 PM, Michael Opdenacker wrote:
> > >&g
On Tue, 2015-03-24 at 13:46 -0700, Michael Opdenacker wrote:
> Hi,
>
> On 03/22/2015 11:59 PM, Hannes Reinecke wrote:
> > On 03/22/2015 05:31 PM, Michael Opdenacker wrote:
> >> This replaces kmalloc + memset by a call to kzalloc
> >> (or kcalloc when appropriate, which zeroes memory too)
> >>
> >>
Hi,
On 03/22/2015 11:59 PM, Hannes Reinecke wrote:
> On 03/22/2015 05:31 PM, Michael Opdenacker wrote:
>> This replaces kmalloc + memset by a call to kzalloc
>> (or kcalloc when appropriate, which zeroes memory too)
>>
>> This also fixes one checkpatch.pl issue in the process.
>>
>> This improveme
On 03/22/2015 05:31 PM, Michael Opdenacker wrote:
> This replaces kmalloc + memset by a call to kzalloc
> (or kcalloc when appropriate, which zeroes memory too)
>
> This also fixes one checkpatch.pl issue in the process.
>
> This improvement was suggested by "make coccicheck"
>
> Signed-off-by:
This replaces kmalloc + memset by a call to kzalloc
(or kcalloc when appropriate, which zeroes memory too)
This also fixes one checkpatch.pl issue in the process.
This improvement was suggested by "make coccicheck"
Signed-off-by: Michael Opdenacker
---
drivers/scsi/aic7xxx/aic79xx_core.c | 3
8 matches
Mail list logo