drm: manager: Fix printk format for size_t
authorSteven Price <steven.price@arm.com>
Thu, 20 Jul 2023 10:44:02 +0000 (11:44 +0100)
committerDanilo Krummrich <dakr@redhat.com>
Thu, 20 Jul 2023 21:42:45 +0000 (23:42 +0200)
sizeof() returns a size_t which may be different to an unsigned long.
Use the correct format specifier of '%zu' to prevent compiler warnings.

Fixes: e6303f323b1a ("drm: manager to keep track of GPUs VA mappings")
Reviewed-by: Danilo Krummrich <dakr@redhat.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/2bf64010-c40a-8b84-144c-5387412b579e@arm.com
drivers/gpu/drm/drm_gpuva_mgr.c

index 0b80177592a649978ce406b2f8e357664c14e039..f86bfad74ff8a2aef4324ef72bbe6f18527f0dc4 100644 (file)
@@ -619,7 +619,7 @@ drm_gpuva_check_overflow(u64 addr, u64 range)
        u64 end;
 
        return WARN(check_add_overflow(addr, range, &end),
-                   "GPUVA address limited to %lu bytes.\n", sizeof(end));
+                   "GPUVA address limited to %zu bytes.\n", sizeof(end));
 }
 
 static bool