From: JB Van Puyvelde <jbvanpuyvelde@gmail.com>
To: rmfrfs@gmail.com
Cc: johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org,
greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org,
JB Van Puyvelde <jbvanpuyvelde@gmail.com>
Subject: [PATCH] staging: greybus: power_supply: replace kzalloc by kcalloc
Date: Thu, 11 May 2017 22:58:56 +0200 [thread overview]
Message-ID: <20170511205856.27023-1-jbvanpuyvelde@gmail.com> (raw)
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(-)
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
next reply other threads:[~2017-05-11 20:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-11 20:58 JB Van Puyvelde [this message]
2017-05-11 21:23 ` [PATCH] staging: greybus: power_supply: replace kzalloc by kcalloc Rui Miguel Silva
2017-05-12 5:39 ` [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=20170511205856.27023-1-jbvanpuyvelde@gmail.com \
--to=jbvanpuyvelde@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=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