From: Viresh Kumar <viresh.kumar@linaro.org>
To: JB Van Puyvelde <jbvanpuyvelde@gmail.com>
Cc: rmfrfs@gmail.com, devel@driverdev.osuosl.org, elder@kernel.org,
johan@kernel.org, linux-kernel@vger.kernel.org,
greybus-dev@lists.linaro.org
Subject: Re: [greybus-dev] [PATCH] staging: greybus: power_supply: replace kzalloc by kcalloc
Date: Fri, 12 May 2017 11:09:07 +0530 [thread overview]
Message-ID: <20170512053907.GS17481@vireshk-i7> (raw)
In-Reply-To: <20170511205856.27023-1-jbvanpuyvelde@gmail.com>
On 11-05-17, 22:58, JB Van Puyvelde wrote:
> According to checkpatch.pl, kcalloc should be preferred to kzalloc with
> multiply.
>
> Signed-off-by: JB Van Puyvelde <jbvanpuyvelde@gmail.com>
> ---
> drivers/staging/greybus/power_supply.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
You should have kept my Ack in this patch, as I have already given it earlier.
Anyway, here it is again.
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>
> diff --git a/drivers/staging/greybus/power_supply.c b/drivers/staging/greybus/power_supply.c
> index e85c988b7034..20cac20518d7 100644
> --- a/drivers/staging/greybus/power_supply.c
> +++ b/drivers/staging/greybus/power_supply.c
> @@ -944,7 +944,7 @@ static int gb_power_supplies_setup(struct gb_power_supplies *supplies)
> if (ret < 0)
> goto out;
>
> - supplies->supply = kzalloc(supplies->supplies_count *
> + supplies->supply = kcalloc(supplies->supplies_count,
> sizeof(struct gb_power_supply),
> GFP_KERNEL);
>
> --
> 2.11.0
>
> _______________________________________________
> greybus-dev mailing list
> greybus-dev@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/greybus-dev
--
viresh
prev parent reply other threads:[~2017-05-12 5:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-11 20:58 [PATCH] staging: greybus: power_supply: replace kzalloc by kcalloc JB Van Puyvelde
2017-05-11 21:23 ` Rui Miguel Silva
2017-05-12 5:39 ` Viresh Kumar [this message]
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=20170512053907.GS17481@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=devel@driverdev.osuosl.org \
--cc=elder@kernel.org \
--cc=greybus-dev@lists.linaro.org \
--cc=jbvanpuyvelde@gmail.com \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rmfrfs@gmail.com \
/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