Message ID | 20200420124151.4356-1-yanaijie@huawei.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | 5975b85ae244dd607965518129e816e4072bc976 |
Headers | show |
Series | [v2] staging: mt7621-pinctrl: Use correct pointer type argument for sizeof | expand |
On Mon, Apr 20, 2020 at 08:41:51PM +0800, Jason Yan wrote: > 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 <yanaijie@huawei.com> > --- > 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
在 2020/4/20 21:07, Greg KH 写道: > On Mon, Apr 20, 2020 at 08:41:51PM +0800, Jason Yan wrote: >> 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 <yanaijie@huawei.com> >> --- >> 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. > thanks, > > greg k-h > > . >
diff --git a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c index d0f06790d38f..caaf9e34f1ee 100644 --- a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c +++ b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c @@ -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);
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 <yanaijie@huawei.com> --- drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)