Skip to content

Commit 4e07d71

Browse files
zackrThomas Zimmermann
authored andcommitted
drm/vmwgfx: Fix a size_t/long int format specifier mismatch
On i386 size_t is of course 32bits and using long int throws warnings, trivially fix it by using the dedicated size_t format. This is enough to fix the following warning found by the kernel test robot: drivers/gpu/drm/vmwgfx/vmwgfx_gem.c: In function 'vmw_bo_print_info': >> drivers/gpu/drm/vmwgfx/vmwgfx_gem.c:230:33: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 230 | seq_printf(m, "\t\t0x%08x: %12ld bytes %s, type = %s", | ~~~~^ | | | long int | %12d 231 | id, bo->base.base.size, placement, type); | ~~~~~~~~~~~~~~~~~~ | | Reported-by: kernel test robot <[email protected]> Signed-off-by: Zack Rusin <[email protected]> Fixes: 8afa13a ("drm/vmwgfx: Implement DRIVER_GEM") Reviewed-by: Martin Krastev <[email protected]> Reviewed-by: Maaz Mombasawala <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 7234511) Signed-off-by: Thomas Zimmermann <[email protected]>
1 parent 1758047 commit 4e07d71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/vmwgfx/vmwgfx_gem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ static void vmw_bo_print_info(int id, struct vmw_buffer_object *bo, struct seq_f
227227
break;
228228
}
229229

230-
seq_printf(m, "\t\t0x%08x: %12ld bytes %s, type = %s",
230+
seq_printf(m, "\t\t0x%08x: %12zu bytes %s, type = %s",
231231
id, bo->base.base.size, placement, type);
232232
seq_printf(m, ", priority = %u, pin_count = %u, GEM refs = %d, TTM refs = %d",
233233
bo->base.priority,

0 commit comments

Comments
 (0)