Re: [PATCH] phy: qcom-qmp: fix noderef.cocci warnings

From: Vivek Gautam
Date: Tue Apr 25 2017 - 04:12:49 EST


Hi Kishon,


On 04/06/2017 09:28 PM, kbuild test robot wrote:
drivers/phy/phy-qcom-qmp.c:847:37-43: ERROR: application of sizeof to pointer

sizeof when applied to a pointer typed expression gives the size of
the pointer

Generated by: scripts/coccinelle/misc/noderef.cocci

CC: Vivek Gautam <vivek.gautam@xxxxxxxxxxxxxx>
Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
---

Reviewed-by: Vivek Gautam <vivek.gautam@xxxxxxxxxxxxxx>

This patch got missed. Please consider pulling it in along with one more
patch [1] from Wei Yongjun.

[1] https://lkml.org/lkml/2017/4/24/1080

Best Regards
Vivek


phy-qcom-qmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/phy/phy-qcom-qmp.c
+++ b/drivers/phy/phy-qcom-qmp.c
@@ -844,7 +844,7 @@ static int qcom_qmp_phy_vreg_init(struct
int num = qmp->cfg->num_vregs;
int i;
- qmp->vregs = devm_kcalloc(dev, num, sizeof(qmp->vregs), GFP_KERNEL);
+ qmp->vregs = devm_kcalloc(dev, num, sizeof(*qmp->vregs), GFP_KERNEL);
if (!qmp->vregs)
return -ENOMEM;

--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project