All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-renesas-soc@vger.kernel.org,
	David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] gpu: drm: rcar-du: rcar_du_drv: don't open code of_device_get_match_data()
Date: Tue, 20 Dec 2016 03:08:05 +0200	[thread overview]
Message-ID: <2560269.bN5qXdpXVS@avalon> (raw)
In-Reply-To: <1456850269-8290-1-git-send-email-wsa@the-dreams.de>

Hi Wolfram,

Thank you for the patch. It looks like I've missed it, sorry about that.

On Tuesday 01 March 2016 17:37:34 Wolfram Sang wrote:
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
> 
> This change will also make Coverity happy by avoiding a theoretical NULL
> pointer dereference; yet another reason is to use the above helper function
> to tighten the code and make it more readable.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

and taken in my tree.

> ---
> 
> Compile tested only. I am on the road and can't test the multimedia drivers
> because of no cables :( If someone could test it, that would be much
> appreciated. Or I'll do it next week. The pattern worked for other drivers
> I could actually test, though.
> 
>  drivers/gpu/drm/rcar-du/rcar_du_drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> b/drivers/gpu/drm/rcar-du/rcar_du_drv.c index
> ed6006bf6bd893..ac95509e80bb7c 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> @@ -318,7 +318,7 @@ static int rcar_du_probe(struct platform_device *pdev)
>  	init_waitqueue_head(&rcdu->commit.wait);
> 
>  	rcdu->dev = &pdev->dev;
> -	rcdu->info = of_match_device(rcar_du_of_table, rcdu->dev)->data;
> +	rcdu->info = of_device_get_match_data(rcdu->dev);
> 
>  	ddev = drm_dev_alloc(&rcar_du_driver, &pdev->dev);
>  	if (!ddev)

-- 
Regards,

Laurent Pinchart

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-renesas-soc@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] gpu: drm: rcar-du: rcar_du_drv: don't open code of_device_get_match_data()
Date: Tue, 20 Dec 2016 03:08:05 +0200	[thread overview]
Message-ID: <2560269.bN5qXdpXVS@avalon> (raw)
In-Reply-To: <1456850269-8290-1-git-send-email-wsa@the-dreams.de>

Hi Wolfram,

Thank you for the patch. It looks like I've missed it, sorry about that.

On Tuesday 01 March 2016 17:37:34 Wolfram Sang wrote:
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
> 
> This change will also make Coverity happy by avoiding a theoretical NULL
> pointer dereference; yet another reason is to use the above helper function
> to tighten the code and make it more readable.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

and taken in my tree.

> ---
> 
> Compile tested only. I am on the road and can't test the multimedia drivers
> because of no cables :( If someone could test it, that would be much
> appreciated. Or I'll do it next week. The pattern worked for other drivers
> I could actually test, though.
> 
>  drivers/gpu/drm/rcar-du/rcar_du_drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> b/drivers/gpu/drm/rcar-du/rcar_du_drv.c index
> ed6006bf6bd893..ac95509e80bb7c 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> @@ -318,7 +318,7 @@ static int rcar_du_probe(struct platform_device *pdev)
>  	init_waitqueue_head(&rcdu->commit.wait);
> 
>  	rcdu->dev = &pdev->dev;
> -	rcdu->info = of_match_device(rcar_du_of_table, rcdu->dev)->data;
> +	rcdu->info = of_device_get_match_data(rcdu->dev);
> 
>  	ddev = drm_dev_alloc(&rcar_du_driver, &pdev->dev);
>  	if (!ddev)

-- 
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2016-12-20  1:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-01 16:37 [PATCH] gpu: drm: rcar-du: rcar_du_drv: don't open code of_device_get_match_data() Wolfram Sang
2016-03-02  9:07 ` Geert Uytterhoeven
2016-12-20  1:08 ` Laurent Pinchart [this message]
2016-12-20  1:08   ` Laurent Pinchart

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=2560269.bN5qXdpXVS@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    /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 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.