public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Koji Matsuoka <koji.matsuoka.xm@renesas.com>,
	David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org,
	linux-renesas-soc@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] drm: rcar-du: remove an unneeded NULL check
Date: Fri, 30 Jun 2017 09:12:38 +0000	[thread overview]
Message-ID: <2896140.RGSNmoZdkf@avalon> (raw)
In-Reply-To: <20170630080011.o5s7tbrcd7gob3et@mwanda>

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


      reply	other threads:[~2017-06-30  9:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-30  8:00 [PATCH] drm: rcar-du: remove an unneeded NULL check Dan Carpenter
2017-06-30  9:12 ` Laurent Pinchart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2896140.RGSNmoZdkf@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=airlied@linux.ie \
    --cc=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=koji.matsuoka.xm@renesas.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox