0276-drm-vc4-fix-warning-in-validate-printf.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. From 903b74d1a831985eced17d72de1634143031a077 Mon Sep 17 00:00:00 2001
  2. From: Dave Airlie <airlied@redhat.com>
  3. Date: Mon, 18 Jan 2016 09:10:42 +1000
  4. Subject: [PATCH 276/381] drm/vc4: fix warning in validate printf.
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. This just fixes a warning on 64-bit builds:
  9. drivers/gpu/drm/vc4/vc4_validate.c: In function ‘validate_gl_shader_rec’:
  10. 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=]
  11. Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
  12. Signed-off-by: Dave Airlie <airlied@redhat.com>
  13. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  14. (cherry picked from commit c671e1e30259da587d7a0162895200601979ee65)
  15. ---
  16. drivers/gpu/drm/vc4/vc4_validate.c | 2 +-
  17. 1 file changed, 1 insertion(+), 1 deletion(-)
  18. --- a/drivers/gpu/drm/vc4/vc4_validate.c
  19. +++ b/drivers/gpu/drm/vc4/vc4_validate.c
  20. @@ -861,7 +861,7 @@ validate_gl_shader_rec(struct drm_device
  21. if (vbo->base.size < offset ||
  22. vbo->base.size - offset < attr_size) {
  23. - DRM_ERROR("BO offset overflow (%d + %d > %d)\n",
  24. + DRM_ERROR("BO offset overflow (%d + %d > %zu)\n",
  25. offset, attr_size, vbo->base.size);
  26. return -EINVAL;
  27. }