Commit d20d31748 (drm: Constify the pretty-print functions) causes the following
build warning:
drivers/gpu/drm/drm_fb_helper.c:127:3: warning: passing argument 1 of 'fb_get_options' discards 'const' qualifier from pointer target type [enabled by default]
Let's change the first argument of fb_get_options from 'char *' to 'const char *'
so that we can get rid of this warning.
Cc: Ville Syrjälä <redacted>
Cc: Daniel Vetter <redacted>
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Fabio Estevam <redacted>
---
drivers/video/fbmem.c | 2 +-
include/linux/fb.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Fix the following build warning:
drivers/gpu/drm/i915/i915_gem.c:3129:3: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'size_t' [-Wformat]
Cc: Daniel Vetter <redacted>
Cc: Dave Airlie <airlied@redhat.com>
Cc: <redacted>
Signed-off-by: Fabio Estevam <redacted>
---
drivers/gpu/drm/i915/i915_gem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -3126,7 +3126,7 @@ i915_gem_object_bind_to_gtt(struct drm_i915_gem_object *obj,*beforeevictingeverythinginavainattempttofindspace.*/if(obj->base.size>gtt_max){-DRM_ERROR("Attempting to bind an object larger than the aperture: object=%zd > %s aperture=%ld\n",+DRM_ERROR("Attempting to bind an object larger than the aperture: object=%zd > %s aperture=%zd\n",obj->base.size,map_and_fenceable?"mappable":"total",gtt_max);
@@ -3126,7 +3126,7 @@ i915_gem_object_bind_to_gtt(struct drm_i915_gem_object *obj,*beforeevictingeverythinginavainattempttofindspace.*/if(obj->base.size>gtt_max){-DRM_ERROR("Attempting to bind an object larger than the aperture: object=%zd > %s aperture=%ld\n",+DRM_ERROR("Attempting to bind an object larger than the aperture: object=%zd > %s aperture=%zd\n",
size_t is unsigned, so you better change it to %zu.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
From: Ville Syrjälä <hidden> Date: 2013-06-19 07:33:41
On Tue, Jun 18, 2013 at 10:26:27AM -0300, Fabio Estevam wrote:
Commit d20d31748 (drm: Constify the pretty-print functions) causes the following
build warning:
drivers/gpu/drm/drm_fb_helper.c:127:3: warning: passing argument 1 of 'fb_get_options' discards 'const' qualifier from pointer target type [enabled by default]
Let's change the first argument of fb_get_options from 'char *' to 'const char *'
so that we can get rid of this warning.
I already sent the same patch alongside the drm constify patches. It
just needs to trickle back into the drm tree via the fbdev folks.