[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1407231606090.1389@chino.kir.corp.google.com>
Date: Wed, 23 Jul 2014 16:07:37 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: Nicholas Krause <xerofoify@...il.com>
cc: gregkh@...uxfoundation.org, john.stultz@...aro.org,
paul.gortmaker@...driver.com, gang.chen.5i5j@...il.com,
yongjun_wei@...ndmicro.com.cn, dan.carpenter@...cle.com,
tomas.winkler@...el.com, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: Change kzalloc to kcalloc
On Wed, 23 Jul 2014, Nicholas Krause wrote:
> diff --git a/drivers/staging/android/ion/ion_dummy_driver.c b/drivers/staging/android/ion/ion_dummy_driver.c
> index 3a45e79..8883432 100644
> --- a/drivers/staging/android/ion/ion_dummy_driver.c
> +++ b/drivers/staging/android/ion/ion_dummy_driver.c
> @@ -67,9 +67,8 @@ static int __init ion_dummy_init(void)
> {
> int i, err;
>
> idev = ion_device_create(NULL);
> - heaps = kzalloc(sizeof(struct ion_heap *) * dummy_ion_pdata.nr,
> - GFP_KERNEL);
> + heaps = kcalloc(*dummy_ion_pdata.nr , sizeof((struct ion_heap *) *dummy_ion_pdata.nr) , GFP_KERNEL);
> if (!heaps)
> return -ENOMEM;
>
Nack, this is not equivalent and would not even compile if tried.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists