public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Fix build warning on 32-bit
@ 2015-08-14 10:35 Thierry Reding
  2015-08-14 11:04 ` [Intel-gfx] " Chris Wilson
  2015-08-17 17:19 ` Zanoni, Paulo R
  0 siblings, 2 replies; 6+ messages in thread
From: Thierry Reding @ 2015-08-14 10:35 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx, dri-devel

From: Thierry Reding <treding@nvidia.com>

The gtt.stolen_size field is of type size_t, and so should be printed
using %zu to avoid build warnings on either 32-bit and 64-bit builds.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c
index a36cb95ec798..f361c4a56995 100644
--- a/drivers/gpu/drm/i915/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
@@ -348,7 +348,7 @@ int i915_gem_init_stolen(struct drm_device *dev)
 	 * memory, so just consider the start. */
 	reserved_total = stolen_top - reserved_base;
 
-	DRM_DEBUG_KMS("Memory reserved for graphics device: %luK, usable: %luK\n",
+	DRM_DEBUG_KMS("Memory reserved for graphics device: %zuK, usable: %luK\n",
 		      dev_priv->gtt.stolen_size >> 10,
 		      (dev_priv->gtt.stolen_size - reserved_total) >> 10);
 
-- 
2.4.5

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Fix build warning on 32-bit
  2015-08-14 10:35 [PATCH] drm/i915: Fix build warning on 32-bit Thierry Reding
@ 2015-08-14 11:04 ` Chris Wilson
  2015-08-17 17:19 ` Zanoni, Paulo R
  1 sibling, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2015-08-14 11:04 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Daniel Vetter, intel-gfx, dri-devel

On Fri, Aug 14, 2015 at 12:35:23PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> The gtt.stolen_size field is of type size_t, and so should be printed
> using %zu to avoid build warnings on either 32-bit and 64-bit builds.

Or better would be to convert stolen.size to u32 so that we know that it
is correctly sized for the hardware irrespective of the compilation
environment.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: Fix build warning on 32-bit
  2015-08-14 10:35 [PATCH] drm/i915: Fix build warning on 32-bit Thierry Reding
  2015-08-14 11:04 ` [Intel-gfx] " Chris Wilson
@ 2015-08-17 17:19 ` Zanoni, Paulo R
  2015-08-26  7:11   ` [Intel-gfx] " Daniel Vetter
  1 sibling, 1 reply; 6+ messages in thread
From: Zanoni, Paulo R @ 2015-08-17 17:19 UTC (permalink / raw)
  To: Vetter, Daniel, thierry.reding@gmail.com
  Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org

Em Sex, 2015-08-14 às 12:35 +0200, Thierry Reding escreveu:
> From: Thierry Reding <treding@nvidia.com>
> 
> The gtt.stolen_size field is of type size_t, and so should be printed
> using %zu to avoid build warnings on either 32-bit and 64-bit builds.

While the suggestion from Chris sounds good, this patch alone is
already a fix, so:
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c 
> b/drivers/gpu/drm/i915/i915_gem_stolen.c
> index a36cb95ec798..f361c4a56995 100644
> --- a/drivers/gpu/drm/i915/i915_gem_stolen.c
> +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
> @@ -348,7 +348,7 @@ int i915_gem_init_stolen(struct drm_device *dev)
>  	 * memory, so just consider the start. */
>  	reserved_total = stolen_top - reserved_base;
>  
> -	DRM_DEBUG_KMS("Memory reserved for graphics device: %luK, 
> usable: %luK\n",
> +	DRM_DEBUG_KMS("Memory reserved for graphics device: %zuK, 
> usable: %luK\n",
>  		      dev_priv->gtt.stolen_size >> 10,
>  		      (dev_priv->gtt.stolen_size - reserved_total) 
> >> 10);
>  
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Fix build warning on 32-bit
  2015-08-17 17:19 ` Zanoni, Paulo R
@ 2015-08-26  7:11   ` Daniel Vetter
  2015-08-26  7:26     ` Jani Nikula
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2015-08-26  7:11 UTC (permalink / raw)
  To: Zanoni, Paulo R
  Cc: Vetter, Daniel, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org

On Mon, Aug 17, 2015 at 05:19:09PM +0000, Zanoni, Paulo R wrote:
> Em Sex, 2015-08-14 às 12:35 +0200, Thierry Reding escreveu:
> > From: Thierry Reding <treding@nvidia.com>
> > 
> > The gtt.stolen_size field is of type size_t, and so should be printed
> > using %zu to avoid build warnings on either 32-bit and 64-bit builds.
> 
> While the suggestion from Chris sounds good, this patch alone is
> already a fix, so:
> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

Queued for -next, thanks for the patch.
-Daniel

> 
> > 
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> >  drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c 
> > b/drivers/gpu/drm/i915/i915_gem_stolen.c
> > index a36cb95ec798..f361c4a56995 100644
> > --- a/drivers/gpu/drm/i915/i915_gem_stolen.c
> > +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
> > @@ -348,7 +348,7 @@ int i915_gem_init_stolen(struct drm_device *dev)
> >  	 * memory, so just consider the start. */
> >  	reserved_total = stolen_top - reserved_base;
> >  
> > -	DRM_DEBUG_KMS("Memory reserved for graphics device: %luK, 
> > usable: %luK\n",
> > +	DRM_DEBUG_KMS("Memory reserved for graphics device: %zuK, 
> > usable: %luK\n",
> >  		      dev_priv->gtt.stolen_size >> 10,
> >  		      (dev_priv->gtt.stolen_size - reserved_total) 
> > >> 10);
> >  
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: Fix build warning on 32-bit
  2015-08-26  7:11   ` [Intel-gfx] " Daniel Vetter
@ 2015-08-26  7:26     ` Jani Nikula
  2015-08-26  7:39       ` Daniel Vetter
  0 siblings, 1 reply; 6+ messages in thread
From: Jani Nikula @ 2015-08-26  7:26 UTC (permalink / raw)
  To: Daniel Vetter, Zanoni, Paulo R
  Cc: Vetter, Daniel, intel-gfx@lists.freedesktop.org,
	thierry.reding@gmail.com, dri-devel@lists.freedesktop.org

On Wed, 26 Aug 2015, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Mon, Aug 17, 2015 at 05:19:09PM +0000, Zanoni, Paulo R wrote:
>> Em Sex, 2015-08-14 às 12:35 +0200, Thierry Reding escreveu:
>> > From: Thierry Reding <treding@nvidia.com>
>> > 
>> > The gtt.stolen_size field is of type size_t, and so should be printed
>> > using %zu to avoid build warnings on either 32-bit and 64-bit builds.
>> 
>> While the suggestion from Chris sounds good, this patch alone is
>> already a fix, so:
>> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> Queued for -next, thanks for the patch.

Great. Also pushed to drm-intel-next-fixes.

Jani.


> -Daniel
>
>> 
>> > 
>> > Signed-off-by: Thierry Reding <treding@nvidia.com>
>> > ---
>> >  drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> > 
>> > diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c 
>> > b/drivers/gpu/drm/i915/i915_gem_stolen.c
>> > index a36cb95ec798..f361c4a56995 100644
>> > --- a/drivers/gpu/drm/i915/i915_gem_stolen.c
>> > +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
>> > @@ -348,7 +348,7 @@ int i915_gem_init_stolen(struct drm_device *dev)
>> >  	 * memory, so just consider the start. */
>> >  	reserved_total = stolen_top - reserved_base;
>> >  
>> > -	DRM_DEBUG_KMS("Memory reserved for graphics device: %luK, 
>> > usable: %luK\n",
>> > +	DRM_DEBUG_KMS("Memory reserved for graphics device: %zuK, 
>> > usable: %luK\n",
>> >  		      dev_priv->gtt.stolen_size >> 10,
>> >  		      (dev_priv->gtt.stolen_size - reserved_total) 
>> > >> 10);
>> >  
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: Fix build warning on 32-bit
  2015-08-26  7:26     ` Jani Nikula
@ 2015-08-26  7:39       ` Daniel Vetter
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2015-08-26  7:39 UTC (permalink / raw)
  To: Jani Nikula
  Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	thierry.reding@gmail.com, Vetter, Daniel

On Wed, Aug 26, 2015 at 10:26:35AM +0300, Jani Nikula wrote:
> On Wed, 26 Aug 2015, Daniel Vetter <daniel@ffwll.ch> wrote:
> > On Mon, Aug 17, 2015 at 05:19:09PM +0000, Zanoni, Paulo R wrote:
> >> Em Sex, 2015-08-14 às 12:35 +0200, Thierry Reding escreveu:
> >> > From: Thierry Reding <treding@nvidia.com>
> >> > 
> >> > The gtt.stolen_size field is of type size_t, and so should be printed
> >> > using %zu to avoid build warnings on either 32-bit and 64-bit builds.
> >> 
> >> While the suggestion from Chris sounds good, this patch alone is
> >> already a fix, so:
> >> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> >
> > Queued for -next, thanks for the patch.
> 
> Great. Also pushed to drm-intel-next-fixes.

Oops, dropped again from dinq ;-)
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
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] 6+ messages in thread

end of thread, other threads:[~2015-08-26  7:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-14 10:35 [PATCH] drm/i915: Fix build warning on 32-bit Thierry Reding
2015-08-14 11:04 ` [Intel-gfx] " Chris Wilson
2015-08-17 17:19 ` Zanoni, Paulo R
2015-08-26  7:11   ` [Intel-gfx] " Daniel Vetter
2015-08-26  7:26     ` Jani Nikula
2015-08-26  7:39       ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox