Skip to contentSkip to conversation

drm/lima: Remove unused lima_vm_print()

PATCH In review Cai Huoqing 2 participants 2 messages Aug 20, 2021 – Aug 23, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/lima: Remove unused lima_vm_print()

lima_vm_print() isn't used, so remove it

---
 drivers/gpu/drm/lima/lima_vm.c | 29 -----------------------------
 drivers/gpu/drm/lima/lima_vm.h |  1 -
 2 files changed, 30 deletions(-)
drivers/gpu/drm/lima/lima_vm.c +0 -29
index 2b2739adc7f5..b3426c5c987f 100644
@@ -251,35 +251,6 @@ void lima_vm_release(struct kref *kref)
 	kfree(vm);
 }
 
-void lima_vm_print(struct lima_vm *vm)
-{
-	int i, j, k;
-	u32 *pd, *pt;
-
-	if (!vm->pd.cpu)
-		return;
-
-	pd = vm->pd.cpu;
-	for (i = 0; i < LIMA_VM_NUM_BT; i++) {
-		if (!vm->bts[i].cpu)
-			continue;
-
-		pt = vm->bts[i].cpu;
-		for (j = 0; j < LIMA_VM_NUM_PT_PER_BT; j++) {
-			int idx = (i << LIMA_VM_NUM_PT_PER_BT_SHIFT) + j;
-
-			printk(KERN_INFO "lima vm pd %03x:%08x\n", idx, pd[idx]);
-
-			for (k = 0; k < LIMA_PAGE_ENT_NUM; k++) {
-				u32 pte = *pt++;
-
-				if (pte)
-					printk(KERN_INFO "  pt %03x:%08x\n", k, pte);
-			}
-		}
-	}
-}
-
 int lima_vm_map_bo(struct lima_vm *vm, struct lima_bo *bo, int pageoff)
 {
 	struct lima_bo_va *bo_va;
drivers/gpu/drm/lima/lima_vm.h +0 -1
index 3a7c74822d8b..291ec9a0a1c4 100644
@@ -58,7 +58,6 @@ static inline void lima_vm_put(struct lima_vm *vm)
 		kref_put(&vm->refcount, lima_vm_release);
 }
 
-void lima_vm_print(struct lima_vm *vm);
 int lima_vm_map_bo(struct lima_vm *vm, struct lima_bo *bo, int pageoff);
 
 #endif
Signature · 1 line
2.25.1
maintainer
#1 lore raw

This function is kept for debug usage.

Quoted 64 lines · Cai Huoqing

lima_vm_print() isn't used, so remove it

---
 drivers/gpu/drm/lima/lima_vm.c | 29 -----------------------------
 drivers/gpu/drm/lima/lima_vm.h |  1 -
 2 files changed, 30 deletions(-)
drivers/gpu/drm/lima/lima_vm.c +0 -29
index 2b2739adc7f5..b3426c5c987f 100644
@@ -251,35 +251,6 @@ void lima_vm_release(struct kref *kref)
        kfree(vm);
 }
 
-void lima_vm_print(struct lima_vm *vm)
-{
-       int i, j, k;
-       u32 *pd, *pt;
-
-       if (!vm->pd.cpu)
-               return;
-
-       pd = vm->pd.cpu;
-       for (i = 0; i < LIMA_VM_NUM_BT; i++) {
-               if (!vm->bts[i].cpu)
-                       continue;
-
-               pt = vm->bts[i].cpu;
-               for (j = 0; j < LIMA_VM_NUM_PT_PER_BT; j++) {
-                       int idx = (i << LIMA_VM_NUM_PT_PER_BT_SHIFT) + j;
-
-                       printk(KERN_INFO "lima vm pd %03x:%08x\n", idx, pd[idx]);
-
-                       for (k = 0; k < LIMA_PAGE_ENT_NUM; k++) {
-                               u32 pte = *pt++;
-
-                               if (pte)
-                                       printk(KERN_INFO "  pt %03x:%08x\n", k, pte);
-                       }
-               }
-       }
-}
-
 int lima_vm_map_bo(struct lima_vm *vm, struct lima_bo *bo, int pageoff)
 {
        struct lima_bo_va *bo_va;
drivers/gpu/drm/lima/lima_vm.h +0 -2
index 3a7c74822d8b..291ec9a0a1c4 100644
@@ -58,7 +58,6 @@ static inline void lima_vm_put(struct lima_vm *vm)
                kref_put(&vm->refcount, lima_vm_release);
 }
 
-void lima_vm_print(struct lima_vm *vm);
 int lima_vm_map_bo(struct lima_vm *vm, struct lima_bo *bo, int pageoff);
 
 #endif
--

2.25.1