mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rui Miguel Silva <rmfrfs@gmail.com>
To: karthik@techveda.org
Cc: johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org,
	greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: greybus: Prefer kcalloc over kzalloc
Date: Mon, 8 May 2017 11:35:42 +0100	[thread overview]
Message-ID: <20170508103542.GA1089@arch-late.localdomain> (raw)
In-Reply-To: <1494080050-20236-1-git-send-email-karthik@techveda.org>

Hi Karthik,
Thanks for the patch.

On Sat, May 06, 2017 at 07:44:10PM +0530, karthik@techveda.org wrote:
>From: Karthik Tummala <karthik@techveda.org>
>
>Fixed following checkpatch.pl warning:
> * WARNING: Prefer kcalloc over kzalloc with multiply
>
>Instead of specifying no.of bytes * size as arugment
>in kzalloc, prefer kcalloc.
>
>Signed-off-by: Karthik Tummala <karthik@techveda.org>

Can you send a v2 with a subject similar to the other commits in
the file. i.e, starting with staging: greybus: light: ...

And you have a typo in the change log s/arugment/argument/.

If this two are fixed, you can add my:
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>

Cheers,
   Rui
>---
> drivers/staging/greybus/light.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/staging/greybus/light.c b/drivers/staging/greybus/light.c
>index 1681362..861a249 100644
>--- a/drivers/staging/greybus/light.c
>+++ b/drivers/staging/greybus/light.c
>@@ -1030,7 +1030,7 @@ static int gb_lights_light_config(struct gb_lights *glights, u8 id)
> 	light->channels_count = conf.channel_count;
> 	light->name = kstrndup(conf.name, NAMES_MAX, GFP_KERNEL);
>
>-	light->channels = kzalloc(light->channels_count *
>+	light->channels = kcalloc(light->channels_count,
> 				  sizeof(struct gb_channel), GFP_KERNEL);
> 	if (!light->channels)
> 		return -ENOMEM;
>@@ -1167,7 +1167,7 @@ static int gb_lights_create_all(struct gb_lights *glights)
> 	if (ret < 0)
> 		goto out;
>
>-	glights->lights = kzalloc(glights->lights_count *
>+	glights->lights = kcalloc(glights->lights_count,
> 				  sizeof(struct gb_light), GFP_KERNEL);
> 	if (!glights->lights) {
> 		ret = -ENOMEM;
>-- 
>1.9.1
>

  reply	other threads:[~2017-05-08 10:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-06 14:14 karthik
2017-05-08 10:35 ` Rui Miguel Silva [this message]
2017-05-08 12:35   ` [PATCH v2] Staging: greybus: light: " karthik
2017-05-09  5:32     ` [greybus-dev] " Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170508103542.GA1089@arch-late.localdomain \
    --to=rmfrfs@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@kernel.org \
    --cc=karthik@techveda.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®