[PATCH] ibmvscsi: convert kmalloc + memset to kcalloc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 07 Apr 2006 19:10:03 +0900, FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx> said:
> 
> Convert kmalloc + memset to kcalloc in ibmvscsi
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
> ---

Acked-by: Dave Boutcher <sleddog@xxxxxxxxxx>

> 
>  drivers/scsi/ibmvscsi/ibmvscsi.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> 359289bba3bd58e6650088ff65ff95e9a549efc0
> diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
> index 0a8ad37..12cb743 100644
> --- a/drivers/scsi/ibmvscsi/ibmvscsi.c
> +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
> @@ -121,10 +121,9 @@ static int initialize_event_pool(struct 
>  
>	pool-> size = size;
>	pool-> next = 0;
> -	pool->events = kmalloc(pool->size * sizeof(*pool->events), GFP_KERNEL);
> +	pool->events = kcalloc(pool->size, sizeof(*pool->events), GFP_KERNEL);
>  	if (!pool->events)
>  		return -ENOMEM;
> -	memset(pool->events, 0x00, pool->size * sizeof(*pool->events));
>  
>	pool-> iu_storage =
>  	    dma_alloc_coherent(hostdata->dev,
> -- 
> 1.1.3
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux