staging: mt7621-pinctrl: Use correct pointer type argument for sizeof
Subsystems (2)
PATCH v3 1/1 staging: mt7621-pinctrl: Use correct pointer type argument for sizeof
Fix the following coccicheck warning:
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c:223:14-36: WARNING: Use correct pointer type argument for sizeof
Signed-off-by Jason Yan <[email protected]>
---
v2->v3: Add this description of v1->v2.
v1->v2: Use sizeof(*p->func) instead of sizeof(struct rt2880_pmx_func *) suggested by Dan Carpenter.
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c +1 -1
@@ -220,7 +220,7 @@ static int rt2880_pinmux_index(struct rt2880_priv *p)/* allocate our function and group mapping index buffers */ f = p->func =devm_kcalloc (p->dev, p->func_count, -sizeof (struct rt2880_pmx_func ), +sizeof (*p->func),GFP_KERNEL ); gpio_func.groups =devm_kcalloc (p->dev, p->group_count,sizeof (int ),GFP_KERNEL );
Signature · 1 line
2.21.1