diff mbox series

[v8,1/5] drm/ast: Remove reference to struct drm_device.pdev

Message ID 20210429105101.25667-2-tzimmermann@suse.de (mailing list archive)
State New, archived
Headers show
Series drm: Move struct drm_device.pdev to legacy | expand

Commit Message

Thomas Zimmermann April 29, 2021, 10:50 a.m. UTC
Using struct drm_device.pdev is deprecated. Upcast with to_pci_dev()
from struct drm_device.dev to get the PCI device structure.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: ba4e0339a6a3 ("drm/ast: Fixed CVE for DP501")
Cc: KuoHsiang Chou <kuohsiang_chou@aspeedtech.com>
Cc: kernel test robot <lkp@intel.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Dave Airlie <airlied@redhat.com>
Cc: dri-devel@lists.freedesktop.org
---
 drivers/gpu/drm/ast/ast_main.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Ruhl, Michael J April 29, 2021, 4:04 p.m. UTC | #1
>-----Original Message-----
>From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of
>Thomas Zimmermann
>Sent: Thursday, April 29, 2021 6:51 AM
>To: jani.nikula@linux.intel.com; joonas.lahtinen@linux.intel.com; Vivi, Rodrigo
><rodrigo.vivi@intel.com>; airlied@linux.ie; daniel@ffwll.ch; chris@chris-
>wilson.co.uk
>Cc: lkp <lkp@intel.com>; intel-gfx@lists.freedesktop.org; dri-
>devel@lists.freedesktop.org; Thomas Zimmermann
><tzimmermann@suse.de>; Dave Airlie <airlied@redhat.com>
>Subject: [PATCH v8 1/5] drm/ast: Remove reference to struct
>drm_device.pdev
>
>Using struct drm_device.pdev is deprecated. Upcast with to_pci_dev()
>from struct drm_device.dev to get the PCI device structure.

Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>

m

>Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>Fixes: ba4e0339a6a3 ("drm/ast: Fixed CVE for DP501")
>Cc: KuoHsiang Chou <kuohsiang_chou@aspeedtech.com>
>Cc: kernel test robot <lkp@intel.com>
>Cc: Thomas Zimmermann <tzimmermann@suse.de>
>Cc: Dave Airlie <airlied@redhat.com>
>Cc: dri-devel@lists.freedesktop.org
>---
> drivers/gpu/drm/ast/ast_main.c | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/ast/ast_main.c
>b/drivers/gpu/drm/ast/ast_main.c
>index 189d783f6e2c..6b49a92dc75f 100644
>--- a/drivers/gpu/drm/ast/ast_main.c
>+++ b/drivers/gpu/drm/ast/ast_main.c
>@@ -411,7 +411,6 @@ struct ast_private *ast_device_create(const struct
>drm_driver *drv,
> 		return ast;
> 	dev = &ast->base;
>
>-	dev->pdev = pdev;
> 	pci_set_drvdata(pdev, dev);
>
> 	ast->regs = pcim_iomap(pdev, 1, 0);
>--
>2.31.1
>
>_______________________________________________
>dri-devel mailing list
>dri-devel@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/dri-devel
Thomas Zimmermann April 29, 2021, 7:22 p.m. UTC | #2
Hi

Am 29.04.21 um 18:04 schrieb Ruhl, Michael J:
> 
> 
>> -----Original Message-----
>> From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of
>> Thomas Zimmermann
>> Sent: Thursday, April 29, 2021 6:51 AM
>> To: jani.nikula@linux.intel.com; joonas.lahtinen@linux.intel.com; Vivi, Rodrigo
>> <rodrigo.vivi@intel.com>; airlied@linux.ie; daniel@ffwll.ch; chris@chris-
>> wilson.co.uk
>> Cc: lkp <lkp@intel.com>; intel-gfx@lists.freedesktop.org; dri-
>> devel@lists.freedesktop.org; Thomas Zimmermann
>> <tzimmermann@suse.de>; Dave Airlie <airlied@redhat.com>
>> Subject: [PATCH v8 1/5] drm/ast: Remove reference to struct
>> drm_device.pdev
>>
>> Using struct drm_device.pdev is deprecated. Upcast with to_pci_dev()
>>from struct drm_device.dev to get the PCI device structure.
> 
> Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>

Awesome! Thanks a lot for the timely response. I pushed everything into 
drm-misc-next before the bitrot sets in again.

Best regards
Thomas

> 
> m
> 
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Fixes: ba4e0339a6a3 ("drm/ast: Fixed CVE for DP501")
>> Cc: KuoHsiang Chou <kuohsiang_chou@aspeedtech.com>
>> Cc: kernel test robot <lkp@intel.com>
>> Cc: Thomas Zimmermann <tzimmermann@suse.de>
>> Cc: Dave Airlie <airlied@redhat.com>
>> Cc: dri-devel@lists.freedesktop.org
>> ---
>> drivers/gpu/drm/ast/ast_main.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/ast/ast_main.c
>> b/drivers/gpu/drm/ast/ast_main.c
>> index 189d783f6e2c..6b49a92dc75f 100644
>> --- a/drivers/gpu/drm/ast/ast_main.c
>> +++ b/drivers/gpu/drm/ast/ast_main.c
>> @@ -411,7 +411,6 @@ struct ast_private *ast_device_create(const struct
>> drm_driver *drv,
>> 		return ast;
>> 	dev = &ast->base;
>>
>> -	dev->pdev = pdev;
>> 	pci_set_drvdata(pdev, dev);
>>
>> 	ast->regs = pcim_iomap(pdev, 1, 0);
>> --
>> 2.31.1
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c
index 189d783f6e2c..6b49a92dc75f 100644
--- a/drivers/gpu/drm/ast/ast_main.c
+++ b/drivers/gpu/drm/ast/ast_main.c
@@ -411,7 +411,6 @@  struct ast_private *ast_device_create(const struct drm_driver *drv,
 		return ast;
 	dev = &ast->base;
 
-	dev->pdev = pdev;
 	pci_set_drvdata(pdev, dev);
 
 	ast->regs = pcim_iomap(pdev, 1, 0);