drm/i915: Use the correct format string modifier for ptrdiff_t
Subsystems (2)
PATCH 1/1 drm/i915: Use the correct format string modifier for ptrdiff_t
When compiling on 32bits, I have the following warning:
drivers/gpu/drm/i915/i915_cmd_parser.c:405:4: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has type ‘int’ [-Wformat=]
DRM_DEBUG_DRIVER("CMD: Command length exceeds batch length: 0x%08X
length=%d batchlen=%ld\n",The ptrdiff_t type has its own modifier: 't'.
--- drivers/gpu/drm/i915/i915_cmd_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_cmd_parser.c +1 -1
@@ -402,7 +402,7 @@ int i915_parse_cmds(struct intel_ring_buffer *ring, length = ((*cmd & desc->length.mask) +LENGTH_BIAS );if ((batch_end - cmd) < length) { -DRM_DEBUG_DRIVER ("CMD: Command length exceeds batch length: 0x%08X length=%d batchlen=%ld\n" , +DRM_DEBUG_DRIVER ("CMD: Command length exceeds batch length: 0x%08X length=%d batchlen=%td\n" , *cmd, length, batch_end - cmd);
Signature · 6 lines
1.8.3.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Thanks for fixing this Damien.
Quoted 32 lines · Damien Lespiau
When compiling on 32bits, I have the following warning:
drivers/gpu/drm/i915/i915_cmd_parser.c:405:4: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has type ‘int’ [-Wformat=]DRM_DEBUG_DRIVER("CMD: Command length exceeds batch length: 0x%08X length=%d batchlen=%ld\n",The
ptrdiff_ttype has its own modifier: 't'.Cc Brad Volkin <[email protected]>Signed-off-by Damien Lespiau <[email protected]>--- drivers/gpu/drm/i915/i915_cmd_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_cmd_parser.c +1
-1@@ -402,7 +402,7 @@ int i915_parse_cmds(struct intel_ring_buffer *ring, length = ((*cmd & desc->length.mask) +LENGTH_BIAS );if ((batch_end - cmd) < length) { -DRM_DEBUG_DRIVER ("CMD: Command length exceeds batch length: 0x%08X length=%d batchlen=%ld\n" , +DRM_DEBUG_DRIVER ("CMD: Command length exceeds batch length: 0x%08X length=%d batchlen=%td\n" , *cmd, length, batch_end - cmd);Signature · 1 line
1.8.3.1
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
AppliedQuoted 17 lines · Bradley D
Thanks for fixing this Damien.
Reviewed-by Brad Volkin <[email protected]>Quoted 12 lines · Damien Lespiau
When compiling on 32bits, I have the following warning:
drivers/gpu/drm/i915/i915_cmd_parser.c:405:4: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has type ‘int’ [-Wformat=]DRM_DEBUG_DRIVER("CMD: Command length exceeds batch length: 0x%08X length=%d batchlen=%ld\n",The
ptrdiff_ttype has its own modifier: 't'.Cc Brad Volkin <[email protected]>Signed-off-by Damien Lespiau <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Quoted 24 lines
Quoted 20 lines
--- drivers/gpu/drm/i915/i915_cmd_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_cmd_parser.c +1
-1@@ -402,7 +402,7 @@ int i915_parse_cmds(struct intel_ring_buffer *ring, length = ((*cmd & desc->length.mask) +LENGTH_BIAS );if ((batch_end - cmd) < length) { -DRM_DEBUG_DRIVER ("CMD: Command length exceeds batch length: 0x%08X length=%d batchlen=%ld\n" , +DRM_DEBUG_DRIVER ("CMD: Command length exceeds batch length: 0x%08X length=%d batchlen=%td\n" , *cmd, length, batch_end - cmd);Signature · 1 line
1.8.3.1_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx