staging: greybus: power_supply: replace kzalloc by kcalloc
Subsystems (3)
PATCH 1/1 staging: greybus: power_supply: replace kzalloc by kcalloc
According to checkpatch.pl, kcalloc should be preferred to kzalloc with multiply.
Signed-off-by JB Van Puyvelde <[email protected]>
--- drivers/staging/greybus/power_supply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/power_supply.c +1 -1
@@ -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 );
Signature · 1 line
2.11.0
Hi JB,
Great! thanks for the patch,
Quoted 4 lines · JB Van Puyvelde
According to checkpatch.pl, kcalloc should be preferred to kzalloc with multiply.
Signed-off-by JB Van Puyvelde <[email protected]>
Reviewed-by Rui Miguel Silva <[email protected]>
Cheers,
Rui
Quoted 20 lines
---
drivers/staging/greybus/power_supply.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/greybus/power_supply.c +1
-1@@ -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 );Signature · 1 line
2.11.0
Quoted 7 lines · JB Van Puyvelde
According to checkpatch.pl, kcalloc should be preferred to kzalloc with multiply.
Signed-off-by JB Van Puyvelde <[email protected]>--- 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 <[email protected]>
Quoted 21 lines
drivers/staging/greybus/power_supply.c +1
-1@@ -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 );Signature · 6 lines
2.11.0 _______________________________________________ greybus-dev mailing list [email protected] https://lists.linaro.org/mailman/listinfo/greybus-dev
Signature · 1 line
viresh