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);
Hi JB, On Thu, May 11, 2017 at 01:20:46AM +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
The patch looks good to me, but care to send to all lists and maintainers, use: scripts/get_maintainer.pl drivers/staging/greybus/power_supply.c
to get the complete list.
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
Hi Rui,
On Thu, 11 May 2017 00:31:11 +0100 Rui Miguel Silva rmfrfs@gmail.com wrote:
The patch looks good to me, but care to send to all lists and maintainers, use: scripts/get_maintainer.pl drivers/staging/greybus/power_supply.c
to get the complete list.
Thank you for your feedback. Do you want me to resend the patch to all the lists and mainteners, to only the missing ones, or is it ok like this?
Cheers, -- JB
Hi JB, On Thu, May 11, 2017 at 08:48:12PM +0200, JB Van Puyvelde wrote:
Hi Rui,
On Thu, 11 May 2017 00:31:11 +0100 Rui Miguel Silva rmfrfs@gmail.com wrote:
The patch looks good to me, but care to send to all lists and maintainers, use: scripts/get_maintainer.pl drivers/staging/greybus/power_supply.c
to get the complete list.
Thank you for your feedback. Do you want me to resend the patch to all the lists and mainteners, to only the missing ones, or is it ok like this?
You need to resend it to all the lists and maintainers.
Cheers, Rui
On 11-05-17, 01:20, 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(-)
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);
Acked-by: Viresh Kumar viresh.kumar@linaro.org