* [PATCH] drm/i915: Use the correct format string modifier for ptrdiff_t
@ 2014-03-18 17:43 Damien Lespiau
2014-03-18 17:53 ` Volkin, Bradley D
0 siblings, 1 reply; 3+ messages in thread
From: Damien Lespiau @ 2014-03-18 17:43 UTC (permalink / raw)
To: intel-gfx
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 <bradley.d.volkin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
drivers/gpu/drm/i915/i915_cmd_parser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
index 7a5756e..0eaed44 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);
--
1.8.3.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Use the correct format string modifier for ptrdiff_t
2014-03-18 17:43 [PATCH] drm/i915: Use the correct format string modifier for ptrdiff_t Damien Lespiau
@ 2014-03-18 17:53 ` Volkin, Bradley D
2014-03-18 18:58 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Volkin, Bradley D @ 2014-03-18 17:53 UTC (permalink / raw)
To: Damien Lespiau; +Cc: intel-gfx
Thanks for fixing this Damien.
Reviewed-by: Brad Volkin <bradley.d.volkin@intel.com>
On Tue, Mar 18, 2014 at 05:43:08PM +0000, Damien Lespiau wrote:
> 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 <bradley.d.volkin@intel.com>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
> drivers/gpu/drm/i915/i915_cmd_parser.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
> index 7a5756e..0eaed44 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);
> --
> 1.8.3.1
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Use the correct format string modifier for ptrdiff_t
2014-03-18 17:53 ` Volkin, Bradley D
@ 2014-03-18 18:58 ` Daniel Vetter
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2014-03-18 18:58 UTC (permalink / raw)
To: Volkin, Bradley D; +Cc: intel-gfx
On Tue, Mar 18, 2014 at 10:53:01AM -0700, Volkin, Bradley D wrote:
> Thanks for fixing this Damien.
>
> Reviewed-by: Brad Volkin <bradley.d.volkin@intel.com>
>
> On Tue, Mar 18, 2014 at 05:43:08PM +0000, Damien Lespiau wrote:
> > 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 <bradley.d.volkin@intel.com>
> > Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Queued for -next, thanks for the patch.
-Daniel
> > ---
> > drivers/gpu/drm/i915/i915_cmd_parser.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
> > index 7a5756e..0eaed44 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);
> > --
> > 1.8.3.1
> >
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-18 18:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-18 17:43 [PATCH] drm/i915: Use the correct format string modifier for ptrdiff_t Damien Lespiau
2014-03-18 17:53 ` Volkin, Bradley D
2014-03-18 18:58 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox