diff mbox series

[3/7] drm/ttm: minor range manager coding style clean ups

Message ID 20210413135248.1266-3-christian.koenig@amd.com (mailing list archive)
State New, archived
Headers show
Series [1/7] drm/nouveau: use bo->base.size instead of mem->num_pages | expand

Commit Message

Christian König April 13, 2021, 1:52 p.m. UTC
No functional changes, just removing the leftovers from the redesign.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/ttm/ttm_range_manager.c | 35 ++++++++++++-------------
 1 file changed, 17 insertions(+), 18 deletions(-)

Comments

Matthew Auld April 13, 2021, 4:18 p.m. UTC | #1
On Tue, 13 Apr 2021 at 14:53, Christian König
<ckoenig.leichtzumerken@gmail.com> wrote:
>
> No functional changes, just removing the leftovers from the redesign.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/ttm/ttm_range_manager.c b/drivers/gpu/drm/ttm/ttm_range_manager.c
index 707e5c152896..b1e3f30f7e2d 100644
--- a/drivers/gpu/drm/ttm/ttm_range_manager.c
+++ b/drivers/gpu/drm/ttm/ttm_range_manager.c
@@ -48,7 +48,8 @@  struct ttm_range_manager {
 	spinlock_t lock;
 };
 
-static inline struct ttm_range_manager *to_range_manager(struct ttm_resource_manager *man)
+static inline struct ttm_range_manager *
+to_range_manager(struct ttm_resource_manager *man)
 {
 	return container_of(man, struct ttm_range_manager, manager);
 }
@@ -109,7 +110,21 @@  static void ttm_range_man_free(struct ttm_resource_manager *man,
 	}
 }
 
-static const struct ttm_resource_manager_func ttm_range_manager_func;
+static void ttm_range_man_debug(struct ttm_resource_manager *man,
+				struct drm_printer *printer)
+{
+	struct ttm_range_manager *rman = to_range_manager(man);
+
+	spin_lock(&rman->lock);
+	drm_mm_print(&rman->mm, printer);
+	spin_unlock(&rman->lock);
+}
+
+static const struct ttm_resource_manager_func ttm_range_manager_func = {
+	.alloc = ttm_range_man_alloc,
+	.free = ttm_range_man_free,
+	.debug = ttm_range_man_debug
+};
 
 int ttm_range_man_init(struct ttm_device *bdev,
 		       unsigned type, bool use_tt,
@@ -163,19 +178,3 @@  int ttm_range_man_fini(struct ttm_device *bdev,
 	return 0;
 }
 EXPORT_SYMBOL(ttm_range_man_fini);
-
-static void ttm_range_man_debug(struct ttm_resource_manager *man,
-				struct drm_printer *printer)
-{
-	struct ttm_range_manager *rman = to_range_manager(man);
-
-	spin_lock(&rman->lock);
-	drm_mm_print(&rman->mm, printer);
-	spin_unlock(&rman->lock);
-}
-
-static const struct ttm_resource_manager_func ttm_range_manager_func = {
-	.alloc = ttm_range_man_alloc,
-	.free = ttm_range_man_free,
-	.debug = ttm_range_man_debug
-};