Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/vc4: fix warning in validate printf.

This just fixes a warning on 64-bit builds:

drivers/gpu/drm/vc4/vc4_validate.c: In function ‘validate_gl_shader_rec’:
drivers/gpu/drm/vc4/vc4_validate.c:864:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=]

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Dave Airlie and committed by
Linus Torvalds
c671e1e3 98406505

+1 -1
+1 -1
drivers/gpu/drm/vc4/vc4_validate.c
··· 861 861 862 862 if (vbo->base.size < offset || 863 863 vbo->base.size - offset < attr_size) { 864 - DRM_ERROR("BO offset overflow (%d + %d > %d)\n", 864 + DRM_ERROR("BO offset overflow (%d + %d > %zu)\n", 865 865 offset, attr_size, vbo->base.size); 866 866 return -EINVAL; 867 867 }