Skip to contentSkip to conversation

staging: mt7621-pinctrl: Use correct pointer type argument for sizeof

PATCH Superseded Jason Yan 2 participants 3 messages Apr 20, 2020

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Jason Yan

author
#0 lore raw

PATCH v2 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

---
 drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c +1 -1
index d0f06790d38f..caaf9e34f1ee 100644
@@ -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 · 7 lines
2.21.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer
#1 lore raw
Quoted 9 lines · Jason Yan

Fix the following coccicheck warning:

drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c:223:14-36: WARNING: Use correct pointer type argument for sizeof

---
 drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

What changed from v1? Always put that below the --- line.

Please fix up and send a v3.

thanks,

greg k-h

author
#2 lore raw
Quoted 6 lines · Greg KH
Quoted 5 lines · Jason Yan

Fix the following coccicheck warning:

drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c:223:14-36: WARNING: Use correct pointer type argument for sizeof

Quoted 9 lines
Quoted 4 lines
---
  drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

What changed from v1? Always put that below the --- line.

Please fix up and send a v3.

OK.

Quoted 6 lines

thanks,

greg k-h

.