drm/amdgpu: Fix non-standard format specifiers in 'amdgpu_show_fdinfo'
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Wed, 26 Jul 2023 07:26:32 +0000 (12:56 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Jul 2023 19:05:31 +0000 (15:05 -0400)
Fixes the following:

WARNING: %Lu is non-standard C, use %llu
+       seq_printf(m, "drm-client-id:\t%Lu\n", vm->immediate.fence_context);

WARNING: %Ld is non-standard C, use %lld
+               seq_printf(m, "drm-engine-%s:\t%Ld ns\n", amdgpu_ip_name[hw_ip],

Cc: Guchun Chen <guchun.chen@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c

index 13d7413..6038b50 100644 (file)
@@ -89,7 +89,7 @@ void amdgpu_show_fdinfo(struct drm_printer *p, struct drm_file *file)
        drm_printf(p, "pasid:\t%u\n", fpriv->vm.pasid);
        drm_printf(p, "drm-driver:\t%s\n", file->minor->dev->driver->name);
        drm_printf(p, "drm-pdev:\t%04x:%02x:%02x.%d\n", domain, bus, dev, fn);
-       drm_printf(p, "drm-client-id:\t%Lu\n", vm->immediate.fence_context);
+       drm_printf(p, "drm-client-id:\t%llu\n", vm->immediate.fence_context);
        drm_printf(p, "drm-memory-vram:\t%llu KiB\n", stats.vram/1024UL);
        drm_printf(p, "drm-memory-gtt: \t%llu KiB\n", stats.gtt/1024UL);
        drm_printf(p, "drm-memory-cpu: \t%llu KiB\n", stats.cpu/1024UL);
@@ -109,7 +109,7 @@ void amdgpu_show_fdinfo(struct drm_printer *p, struct drm_file *file)
                if (!usage[hw_ip])
                        continue;
 
-               drm_printf(p, "drm-engine-%s:\t%Ld ns\n", amdgpu_ip_name[hw_ip],
+               drm_printf(p, "drm-engine-%s:\t%lld ns\n", amdgpu_ip_name[hw_ip],
                           ktime_to_ns(usage[hw_ip]));
        }
 }