* re: drm: rockchip: Add basic drm driver
@ 2014-12-16 11:51 Dan Carpenter
2014-12-17 0:56 ` Mark yao
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2014-12-16 11:51 UTC (permalink / raw)
To: mark.yao; +Cc: dri-devel
Hello Mark Yao,
The patch 2048e3286f34: "drm: rockchip: Add basic drm driver" from
Aug 22, 2014, leads to the following static checker warning:
drivers/gpu/drm/rockchip/rockchip_drm_vop.c:1383 vop_bind()
warn: unsigned 'vop->irq' is never less than zero.
drivers/gpu/drm/rockchip/rockchip_drm_vop.c
1381
1382 vop->irq = platform_get_irq(pdev, 0);
1383 if (vop->irq < 0) {
^^^^^^^^^^^^
Doesn't work.
1384 dev_err(dev, "cannot find irq for vop\n");
1385 return vop->irq;
1386 }
1387
drivers/gpu/drm/rockchip/rockchip_drm_vop.c:1188 vop_create_crtc()
warn: missing error code here? 'of_get_child_by_name()' failed.
1184 port = of_get_child_by_name(dev->of_node, "port");
1185 if (!port) {
1186 DRM_ERROR("no port node found in %s\n",
1187 dev->of_node->full_name);
Probably, "ret = -ENODEV;"
1188 goto err_cleanup_crtc;
1189 }
1190
regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: drm: rockchip: Add basic drm driver
2014-12-16 11:51 drm: rockchip: Add basic drm driver Dan Carpenter
@ 2014-12-17 0:56 ` Mark yao
2014-12-17 12:42 ` Dan Carpenter
0 siblings, 1 reply; 3+ messages in thread
From: Mark yao @ 2014-12-17 0:56 UTC (permalink / raw)
To: Dan Carpenter; +Cc: dri-devel
Hello Dan,
Thanks for your review, I will fix it soon.
Do you use a script to find out these issues? I was interested in this
script.
Can you teach me how to find this script and use it?
regards,
Mark Yao
On 2014年12月16日 19:51, Dan Carpenter wrote:
> Hello Mark Yao,
>
> The patch 2048e3286f34: "drm: rockchip: Add basic drm driver" from
> Aug 22, 2014, leads to the following static checker warning:
>
> drivers/gpu/drm/rockchip/rockchip_drm_vop.c:1383 vop_bind()
> warn: unsigned 'vop->irq' is never less than zero.
>
> drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> 1381
> 1382 vop->irq = platform_get_irq(pdev, 0);
> 1383 if (vop->irq < 0) {
> ^^^^^^^^^^^^
> Doesn't work.
right, we should use "int" but not "unsigned int" for irq type.
> 1384 dev_err(dev, "cannot find irq for vop\n");
> 1385 return vop->irq;
> 1386 }
> 1387
>
> drivers/gpu/drm/rockchip/rockchip_drm_vop.c:1188 vop_create_crtc()
> warn: missing error code here? 'of_get_child_by_name()' failed.
>
> 1184 port = of_get_child_by_name(dev->of_node, "port");
> 1185 if (!port) {
> 1186 DRM_ERROR("no port node found in %s\n",
> 1187 dev->of_node->full_name);
>
> Probably, "ret = -ENODEV;"
right, "ret = -ENODEV" is needed.
>
> 1188 goto err_cleanup_crtc;
> 1189 }
> 1190
>
>
> regards,
> dan carpenter
>
>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: drm: rockchip: Add basic drm driver
2014-12-17 0:56 ` Mark yao
@ 2014-12-17 12:42 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2014-12-17 12:42 UTC (permalink / raw)
To: Mark yao; +Cc: dri-devel
On Wed, Dec 17, 2014 at 08:56:25AM +0800, Mark yao wrote:
> Hello Dan,
>
> Thanks for your review, I will fix it soon.
> Do you use a script to find out these issues? I was interested in
> this script.
> Can you teach me how to find this script and use it?
The first one is a smatch warning. http://smatch.sf.net. The other one
is from a private Smatch check that I haven't pushed yet.
regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-17 12:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-16 11:51 drm: rockchip: Add basic drm driver Dan Carpenter
2014-12-17 0:56 ` Mark yao
2014-12-17 12:42 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.