aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Lespiau <[email protected]>2014-03-18 17:43:08 +0000
committerDaniel Vetter <[email protected]>2014-03-18 19:49:42 +0100
commite5081a538a565284fec5f30a937d98e460d5e780 (patch)
treeab78e74458ac3ada8980be03f1a6257abadd9fe1
parentfa50ad614892c99232ce30710ffa704c485bb679 (diff)
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'. Cc: Brad Volkin <[email protected]> Signed-off-by: Damien Lespiau <[email protected]> Reviewed-by: Brad Volkin <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
-rw-r--r--drivers/gpu/drm/i915/i915_cmd_parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
index 7a5756e9bb86..0eaed44aee6d 100644
--- a/drivers/gpu/drm/i915/i915_cmd_parser.c
+++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
@@ -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);