drm/i915: Fix build warning on 32-bit
Subsystems (2)
PATCH 1/1 drm/i915: Fix build warning on 32-bit
From: Thierry Reding <[email protected]>
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.
--- drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_stolen.c +1 -1
@@ -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 );
Signature · 6 lines
2.4.5 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 4 lines · Thierry Reding
From: Thierry Reding <[email protected]>
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
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Em Sex, 2015-08-14 às 12:35 +0200, Thierry Reding escreveu:
Quoted 4 lines
From: Thierry Reding <[email protected]>
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:
Quoted 20 lines
Signed-off-by Thierry Reding <[email protected]>--- drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_gem_stolen.c +1
-1@@ -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,
Quoted 3 lines
(
dev_priv->gtt.stolen_size-reserved_total)Quoted 1 line
Quoted 1 line
10);
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
AppliedQuoted 9 lines · Paulo R
Em Sex, 2015-08-14 às 12:35 +0200, Thierry Reding escreveu:
Quoted 4 lines
From: Thierry Reding <[email protected]>
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 <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Quoted 28 lines
Quoted 21 lines
Signed-off-by Thierry Reding <[email protected]>--- drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_gem_stolen.c +1
-1@@ -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,Quoted 3 lines
(
dev_priv->gtt.stolen_size-reserved_total)Quoted 1 line
Quoted 1 line
10);
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Jani Nikula
maintainerQuoted 4 lines · Daniel Vetter
Quoted 3 lines · Paulo R
Em Sex, 2015-08-14 às 12:35 +0200, Thierry Reding escreveu:
Quoted 2 lines
From: Thierry Reding <[email protected]>
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
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 <[email protected]>Queued for -next, thanks for the patch.
Great. Also pushed to drm-intel-next-fixes.
Jani.
Quoted 39 lines
-Daniel
Quoted 28 lines
Quoted 21 lines
Signed-off-by Thierry Reding <[email protected]>--- drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_gem_stolen.c +1
-1@@ -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,Quoted 3 lines
(
dev_priv->gtt.stolen_size-reserved_total)Quoted 1 line
Quoted 1 line
10);
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 8 lines · Jani Nikula
Quoted 7 lines · Daniel Vetter
Quoted 6 lines · Paulo R
Em Sex, 2015-08-14 às 12:35 +0200, Thierry Reding escreveu:
Quoted 4 lines
From: Thierry Reding <[email protected]>
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.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
While the suggestion from Chris sounds good, this patch alone is already a fix, so:
Reviewed-by Paulo Zanoni <[email protected]>Queued for -next, thanks for the patch.
Great. Also pushed to drm-intel-next-fixes.
Oops, dropped again from dinq ;-)
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx