Re: [PATCH] drm/buddy: Fix drm buddy info output format

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

 



Am 04.08.23 um 08:56 schrieb Ma Jun:
[1] Change pages to blocks to avoid confusion.
[2] Fix output format to align the output info.

Signed-off-by: Ma Jun <Jun.Ma2@xxxxxxx>

Of hand looks good to me, but Arun should probably judge.

Christian.

---
  drivers/gpu/drm/drm_buddy.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c
index 3d1f50f481cf..ef3dd15c334a 100644
--- a/drivers/gpu/drm/drm_buddy.c
+++ b/drivers/gpu/drm/drm_buddy.c
@@ -781,15 +781,15 @@ void drm_buddy_print(struct drm_buddy *mm, struct drm_printer *p)
  			count++;
  		}
- drm_printf(p, "order-%d ", order);
+		drm_printf(p, "order-%2d ", order);
free = count * (mm->chunk_size << order);
  		if (free < SZ_1M)
-			drm_printf(p, "free: %lluKiB", free >> 10);
+			drm_printf(p, "free: %8llu KiB", free >> 10);
  		else
-			drm_printf(p, "free: %lluMiB", free >> 20);
+			drm_printf(p, "free: %8llu MiB", free >> 20);
- drm_printf(p, ", pages: %llu\n", count);
+		drm_printf(p, ", blocks: %llu\n", count);
  	}
  }
  EXPORT_SYMBOL(drm_buddy_print);




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux