[PATCH] drm/amdgpu: Remove dead static variable

Christian König ckoenig.leichtzumerken at gmail.com
Mon Nov 19 11:19:29 UTC 2018


Am 19.11.18 um 12:07 schrieb Rex Zhu:
> The static struct drm_driver *driver was
> not used because drm_pci_init was deprecated
>
> Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

Can you of hand see what "pdriver" is used for? That looks suspicious 
like something deprecated as well.

Regards,
Christian.

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 3b7d511..fa33e31 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -1235,7 +1235,6 @@ static int amdgpu_flush(struct file *f, fl_owner_t id)
>   	.patchlevel = KMS_DRIVER_PATCHLEVEL,
>   };
>   
> -static struct drm_driver *driver;
>   static struct pci_driver *pdriver;
>   
>   static struct pci_driver amdgpu_kms_pci_driver = {
> @@ -1267,9 +1266,8 @@ static int __init amdgpu_init(void)
>   		goto error_fence;
>   
>   	DRM_INFO("amdgpu kernel modesetting enabled.\n");
> -	driver = &kms_driver;
>   	pdriver = &amdgpu_kms_pci_driver;
> -	driver->num_ioctls = amdgpu_max_kms_ioctl;
> +	kms_driver.num_ioctls = amdgpu_max_kms_ioctl;
>   	amdgpu_register_atpx_handler();
>   
>   	/* Ignore KFD init failures. Normal when CONFIG_HSA_AMD is not set. */



More information about the amd-gfx mailing list