From: Jani Nikula <jani.nikula@intel.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
jani.nikula@intel.com, Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, linux-next@vger.kernel.org
Subject: [PATCH] drm/i915: fix command parser debug print format mismatches
Date: Wed, 2 Apr 2014 11:24:20 +0300 [thread overview]
Message-ID: <1396427060-12539-1-git-send-email-jani.nikula@intel.com> (raw)
In-Reply-To: <533B106B.8090408@infradead.org>
Drop the cast from the pointer diff to fix:
drivers/gpu/drm/i915/i915_cmd_parser.c:405:4: warning: format '%td' expects
argument of type 'ptrdiff_t', but argument 5 has type 'long unsigned int'
[-Wformat]
While at it, use %u for u32.
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
Randy, try as I might, I wasn't able to coerce gcc to spit out that
warning. Please enlighten me! (Does this fix the warn?)
Thanks for the report.
---
drivers/gpu/drm/i915/i915_cmd_parser.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
index 71ac3b4eaa0d..e5c4e99a22fb 100644
--- a/drivers/gpu/drm/i915/i915_cmd_parser.c
+++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
@@ -811,10 +811,10 @@ 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=%td\n",
+ DRM_DEBUG_DRIVER("CMD: Command length exceeds batch length: 0x%08X length=%u batchlen=%td\n",
*cmd,
length,
- (unsigned long)(batch_end - cmd));
+ batch_end - cmd);
ret = -EINVAL;
break;
}
--
1.7.9.5
next prev parent reply other threads:[~2014-04-02 8:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-01 7:39 linux-next: Tree for Apr 1 Stephen Rothwell
2014-04-01 18:34 ` linux-next: Tree for Apr 1 (netfilter) Randy Dunlap
2014-04-01 19:22 ` David Miller
2014-04-06 13:50 ` Geert Uytterhoeven
2014-04-06 15:31 ` David Miller
2014-04-06 16:08 ` Geert Uytterhoeven
2014-04-01 19:15 ` linux-next: Tree for Apr 1 (drivers/gpu/drm/i915) Randy Dunlap
2014-04-02 8:24 ` Jani Nikula [this message]
2014-04-02 15:26 ` [PATCH] drm/i915: fix command parser debug print format mismatches Randy Dunlap
2014-04-03 9:32 ` Daniel Vetter
2014-04-03 15:44 ` Damien Lespiau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1396427060-12539-1-git-send-email-jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox