drm/amdgpu: Remove dead static variable
Subsystems (2)
PATCH v2 1/1 drm/amdgpu: Remove dead static variable
The static struct drm_driver *driver was
not used because drm_pci_init was deprecated
v2: Remove static pointer pdriver
Reviewed-by Christian König <[email protected]>
Signed-off-by Rex Zhu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +3 -8
@@ -1235,9 +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 = { .name =DRIVER_NAME , .id_table = pciidlist,
@@ -1267,16 +1264,14 @@ 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. */ amdgpu_amdkfd_init ();/* let modprobe override vga console setting */ -return pci_register_driver (pdriver); +return pci_register_driver (&amdgpu_kms_pci_driver); error_fence:amdgpu_sync_fini ();
@@ -1288,7 +1283,7 @@ static int __init amdgpu_init(void) static void __exit amdgpu_exit(void) {amdgpu_amdkfd_fini (); -pci_unregister_driver (pdriver); +pci_unregister_driver (&amdgpu_kms_pci_driver);amdgpu_unregister_atpx_handler ();amdgpu_sync_fini ();amdgpu_fence_slab_fini ();
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1542640879-3057-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org
Alex Deucher
Reviewed-byQuoted 8 lines · Rex Zhu
The static struct
drm_driver*driver was
not used becausedrm_pci_initwas deprecatedv2: Remove static pointer pdriver
Reviewed-by Christian König <[email protected]>Signed-off-by Rex Zhu <[email protected]>
Reviewed-by Alex Deucher <[email protected]>
Quoted 49 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +3
-9@@ -1235,9 +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 = { .name =DRIVER_NAME , .id_table = pciidlist,@@ -1267,16 +1264,14 @@ 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. */ amdgpu_amdkfd_init ();/* let modprobe override vga console setting */ -return pci_register_driver (pdriver); +return pci_register_driver (&amdgpu_kms_pci_driver); error_fence:amdgpu_sync_fini ();@@ -1288,7 +1283,7 @@ static int __init amdgpu_init(void) static void __exit amdgpu_exit(void) {amdgpu_amdkfd_fini (); -pci_unregister_driver (pdriver); +pci_unregister_driver (&amdgpu_kms_pci_driver);amdgpu_unregister_atpx_handler ();amdgpu_sync_fini ();amdgpu_fence_slab_fini (); --1.9.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx