Skip to content

Commit 213e242

Browse files
lucasdemarchirodrigovivi
authored andcommitted
drm/xe/guc: Fix size_t print format
Use %zx format to print size_t to remove the following warning when building for i386: >> drivers/gpu/drm/xe/xe_guc_ct.c:1727:43: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] 1727 | drm_printf(p, "[CTB].length: 0x%lx\n", snapshot->ctb_size); | ~~~ ^~~~~~~~~~~~~~~~~~ | %zx Cc: José Roberto de Souza <[email protected]> Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Fixes: 643f209 ("drm/xe: Make GUC binaries dump consistent with other binaries in devcoredump") Reviewed-by: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Lucas De Marchi <[email protected]> (cherry picked from commit 7748289) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 643f209 commit 213e242

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/gpu/drm/xe/xe_guc_ct.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1724,7 +1724,7 @@ void xe_guc_ct_snapshot_print(struct xe_guc_ct_snapshot *snapshot,
17241724
snapshot->g2h_outstanding);
17251725

17261726
if (snapshot->ctb) {
1727-
drm_printf(p, "[CTB].length: 0x%lx\n", snapshot->ctb_size);
1727+
drm_printf(p, "[CTB].length: 0x%zx\n", snapshot->ctb_size);
17281728
xe_print_blob_ascii85(p, "[CTB].data", '\n',
17291729
snapshot->ctb, 0, snapshot->ctb_size);
17301730
}

drivers/gpu/drm/xe/xe_guc_log.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ void xe_guc_log_snapshot_print(struct xe_guc_log_snapshot *snapshot, struct drm_
208208
drm_printf(p, "GuC timestamp: 0x%08llX [%llu]\n", snapshot->stamp, snapshot->stamp);
209209
drm_printf(p, "Log level: %u\n", snapshot->level);
210210

211-
drm_printf(p, "[LOG].length: 0x%lx\n", snapshot->size);
211+
drm_printf(p, "[LOG].length: 0x%zx\n", snapshot->size);
212212
remain = snapshot->size;
213213
for (i = 0; i < snapshot->num_chunks; i++) {
214214
size_t size = min(GUC_LOG_CHUNK_SIZE, remain);

0 commit comments

Comments
 (0)