* [PATCH] drm: rcar-du: remove an unneeded NULL check
@ 2017-06-30 8:00 Dan Carpenter
2017-06-30 9:12 ` Laurent Pinchart
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-06-30 8:00 UTC (permalink / raw)
To: Laurent Pinchart, Koji Matsuoka
Cc: David Airlie, dri-devel, linux-renesas-soc, kernel-janitors
"params" can't be NULL here. The next lines assume that we either
hit the break statement of "params->mpixelclock = ~0UL". The
inconsistent NULL checking makes static checkers complain. I've just
removed the test.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c b/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c
index 7539626b8ebd..dc85b53d58ef 100644
--- a/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c
+++ b/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c
@@ -45,7 +45,7 @@ static int rcar_hdmi_phy_configure(struct dw_hdmi *hdmi,
{
const struct rcar_hdmi_phy_params *params = rcar_hdmi_phy_params;
- for (; params && params->mpixelclock != ~0UL; ++params) {
+ for (; params->mpixelclock != ~0UL; ++params) {
if (mpixelclock <= params->mpixelclock)
break;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm: rcar-du: remove an unneeded NULL check
2017-06-30 8:00 [PATCH] drm: rcar-du: remove an unneeded NULL check Dan Carpenter
@ 2017-06-30 9:12 ` Laurent Pinchart
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Pinchart @ 2017-06-30 9:12 UTC (permalink / raw)
To: Dan Carpenter
Cc: Koji Matsuoka, David Airlie, dri-devel, linux-renesas-soc,
kernel-janitors
Hi Dan,
Thank you for the patch.
On Friday 30 Jun 2017 11:00:12 Dan Carpenter wrote:
> "params" can't be NULL here. The next lines assume that we either
> hit the break statement of "params->mpixelclock = ~0UL". The
> inconsistent NULL checking makes static checkers complain. I've just
> removed the test.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
and taken in my tree for v4.14.
> diff --git a/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c
> b/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c index 7539626b8ebd..dc85b53d58ef
> 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c
> @@ -45,7 +45,7 @@ static int rcar_hdmi_phy_configure(struct dw_hdmi *hdmi,
> {
> const struct rcar_hdmi_phy_params *params = rcar_hdmi_phy_params;
>
> - for (; params && params->mpixelclock != ~0UL; ++params) {
> + for (; params->mpixelclock != ~0UL; ++params) {
> if (mpixelclock <= params->mpixelclock)
> break;
> }
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-30 9:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-30 8:00 [PATCH] drm: rcar-du: remove an unneeded NULL check Dan Carpenter
2017-06-30 9:12 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).