[Intel-gfx] [PATCH] drm/i915: Fix build warning on 32-bit

Jani Nikula jani.nikula at linux.intel.com
Wed Aug 26 00:26:35 PDT 2015


On Wed, 26 Aug 2015, Daniel Vetter <daniel at 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 at 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 at 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 at 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 at 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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center


More information about the dri-devel mailing list