Skip to content

Commit e22103b

Browse files
author
Andi Shyti
committed
drm/i915/gem: Use the correct format specifier for resource_size_t
Commit 05da7d9 ("drm/i915/gem: Downgrade stolen lmem setup warning") adds a debug message where the "lmem_size" and "dsm_base" variables are printed using the %lli identifier. However, these variables are defined as resource_size_t, which are unsigned long for 32-bit machines and unsigned long long for 64-bit machines. The documentation (core-api/printk-formats.rst) recommends using the %pa specifier for printing addresses and sizes of resources. Replace %lli with %pa. This patch also mutes the following sparse warning when compiling with: make W=1 ARCH=i386 drivers/gpu/drm/i915 >> drivers/gpu/drm/i915/gem/i915_gem_stolen.c:941:5: error: format '%lli' expects argument of type 'long long int', but argument 5 has type 'resource_size_t' {aka 'unsigned int'} [-Werror=format=] Signed-off-by: Andi Shyti <[email protected]> Cc: Jonathan Cavitt <[email protected]> Reviewed-by: Jonathan Cavitt <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 3bece98 commit e22103b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/i915/gem/i915_gem_stolen.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -938,8 +938,8 @@ i915_gem_stolen_lmem_setup(struct drm_i915_private *i915, u16 type,
938938
dsm_base = intel_uncore_read64(uncore, GEN6_DSMBASE) & GEN11_BDSM_MASK;
939939
if (lmem_size < dsm_base) {
940940
drm_dbg(&i915->drm,
941-
"Disabling stolen memory support due to OOB placement: lmem_size = %lli vs dsm_base = %lli\n",
942-
lmem_size, dsm_base);
941+
"Disabling stolen memory support due to OOB placement: lmem_size = %pa vs dsm_base = %pa\n",
942+
&lmem_size, &dsm_base);
943943
return NULL;
944944
}
945945
dsm_size = ALIGN_DOWN(lmem_size - dsm_base, SZ_1M);

0 commit comments

Comments
 (0)