Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1640055
| From | Rui Miguel Silva <rmfrfs@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] staging: greybus: power_supply: replace kzalloc by kcalloc |
| Date | 2017-05-11 23:30 +0200 |
| Message-ID | <tG3ON-3eu-5@gated-at.bofh.it> (permalink) |
| References | <tG3vu-37w-57@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi JB, Great! thanks for the patch, On Thu, May 11, 2017 at 10:58:56PM +0200, 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> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Cheers, Rui >--- > 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 >
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] staging: greybus: power_supply: replace kzalloc by kcalloc JB Van Puyvelde <jbvanpuyvelde@gmail.com> - 2017-05-11 23:10 +0200 Re: [PATCH] staging: greybus: power_supply: replace kzalloc by kcalloc Rui Miguel Silva <rmfrfs@gmail.com> - 2017-05-11 23:30 +0200 Re: [greybus-dev] [PATCH] staging: greybus: power_supply: replace kzalloc by kcalloc Viresh Kumar <viresh.kumar@linaro.org> - 2017-05-12 07:40 +0200
csiph-web