* [PATCH] gpu: drm: rcar-du: rcar_du_drv: don't open code of_device_get_match_data()
@ 2016-03-01 16:37 Wolfram Sang
2016-03-02 9:07 ` Geert Uytterhoeven
2016-12-20 1:08 ` Laurent Pinchart
0 siblings, 2 replies; 4+ messages in thread
From: Wolfram Sang @ 2016-03-01 16:37 UTC (permalink / raw)
To: linux-renesas-soc; +Cc: Wolfram Sang, Laurent Pinchart, David Airlie, dri-devel
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>
---
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)
--
2.7.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] gpu: drm: rcar-du: rcar_du_drv: don't open code of_device_get_match_data()
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
1 sibling, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2016-03-02 9:07 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Laurent Pinchart, David Airlie,
DRI Development
On Tue, Mar 1, 2016 at 5:37 PM, Wolfram Sang <wsa@the-dreams.de> 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: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpu: drm: rcar-du: rcar_du_drv: don't open code of_device_get_match_data()
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-12-20 1:08 ` Laurent Pinchart
2016-12-20 1:08 ` Laurent Pinchart
1 sibling, 0 replies; 4+ messages in thread
From: Laurent Pinchart @ 2016-12-20 1:08 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-renesas-soc, David Airlie, dri-devel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpu: drm: rcar-du: rcar_du_drv: don't open code of_device_get_match_data()
@ 2016-12-20 1:08 ` Laurent Pinchart
0 siblings, 0 replies; 4+ messages in thread
From: Laurent Pinchart @ 2016-12-20 1:08 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-renesas-soc, dri-devel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-12-20 1:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2016-12-20 1:08 ` Laurent Pinchart
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.