Re: [PATCH 12/19] drm/radeon: Remove drm_debugfs_remove_files() call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 26.01.2017 um 23:56 schrieb Noralf Trønnes:
drm_debugfs_cleanup() now removes all minor->debugfs_list entries
automatically, so it's not necessary to call drm_debugfs_remove_files().

Cc: alexander.deucher@xxxxxxx
Cc: christian.koenig@xxxxxxx
Signed-off-by: Noralf Trønnes <noralf@xxxxxxxxxxx>

Great work! I wanted to do this for quite a while as well, but never found time to look into it.

A good first step, but when we don't have radeon_debugfs_remove_files() any more we don't need rdev->debugfs and all the related housekeeping either.

Additional to that we have a couple of entries added/removed to the minor manually, just grep for "debugfs_remove" in the radeon code. Those calls can now be removed as well.

But all that can be done in separate patches, this one is Reviewed-by: Christian König <christian.koenig@xxxxxxx>.

Regards,
Christian.

---
  drivers/gpu/drm/radeon/radeon_device.c | 16 ----------------
  1 file changed, 16 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 8a1df2a..4b0c388 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -1549,8 +1549,6 @@ int radeon_device_init(struct radeon_device *rdev,
  	return r;
  }
-static void radeon_debugfs_remove_files(struct radeon_device *rdev);
-
  /**
   * radeon_device_fini - tear down the driver
   *
@@ -1577,7 +1575,6 @@ void radeon_device_fini(struct radeon_device *rdev)
  	rdev->rmmio = NULL;
  	if (rdev->family >= CHIP_BONAIRE)
  		radeon_doorbell_fini(rdev);
-	radeon_debugfs_remove_files(rdev);
  }
@@ -1954,16 +1951,3 @@ int radeon_debugfs_add_files(struct radeon_device *rdev,
  #endif
  	return 0;
  }
-
-static void radeon_debugfs_remove_files(struct radeon_device *rdev)
-{
-#if defined(CONFIG_DEBUG_FS)
-	unsigned i;
-
-	for (i = 0; i < rdev->debugfs_count; i++) {
-		drm_debugfs_remove_files(rdev->debugfs[i].files,
-					 rdev->debugfs[i].num_files,
-					 rdev->ddev->primary);
-	}
-#endif
-}


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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux