Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1418535 > unrolled thread

[PATCH] drm/rockchip: fix compile warnings for 64-bit

Started byBrian Norris <briannorris@chromium.org>
First post2016-06-09 19:50 +0200
Last post2016-06-10 03:00 +0200
Articles 4 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] drm/rockchip: fix compile warnings for 64-bit Brian Norris <briannorris@chromium.org> - 2016-06-09 19:50 +0200
    Re: [PATCH] drm/rockchip: fix compile warnings for 64-bit Doug Anderson <dianders@chromium.org> - 2016-06-09 23:00 +0200
      Re: [PATCH] drm/rockchip: fix compile warnings for 64-bit Daniel Vetter <daniel@ffwll.ch> - 2016-06-10 16:40 +0200
    Re: [PATCH] drm/rockchip: fix compile warnings for 64-bit Caesar Wang <wxt@rock-chips.com> - 2016-06-10 03:00 +0200

#1418535 — [PATCH] drm/rockchip: fix compile warnings for 64-bit

FromBrian Norris <briannorris@chromium.org>
Date2016-06-09 19:50 +0200
Subject[PATCH] drm/rockchip: fix compile warnings for 64-bit
Message-ID<rIcfD-18x-17@gated-at.bofh.it>
Rockchip DRM does not yet build properly for ARM64, but we might as well
get the printf formatting correct now, to avoid the following warnings:

drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c: In function 'rockchip_drm_fbdev_create':
drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c:111:2: warning: format '%d' expects argument of type 'int', but argument 8 has type 'size_t' [-Wformat=]
  DRM_DEBUG_KMS("FB [%dx%d]-%d kvaddr=%p offset=%ld size=%d\n",
  ^

drivers/gpu/drm/rockchip/rockchip_drm_gem.c: In function 'rockchip_gem_alloc_buf':
drivers/gpu/drm/rockchip/rockchip_drm_gem.c:41:3: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'size_t' [-Wformat=]
   DRM_ERROR("failed to allocate %#x byte dma buffer", obj->size);
   ^

Signed-off-by: Brian Norris <briannorris@chromium.org>
---
 drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 2 +-
 drivers/gpu/drm/rockchip/rockchip_drm_gem.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
index f261512bb4a0..bab4cd18b6b0 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
@@ -108,7 +108,7 @@ static int rockchip_drm_fbdev_create(struct drm_fb_helper *helper,
 	fbi->screen_size = rk_obj->base.size;
 	fbi->fix.smem_len = rk_obj->base.size;
 
-	DRM_DEBUG_KMS("FB [%dx%d]-%d kvaddr=%p offset=%ld size=%d\n",
+	DRM_DEBUG_KMS("FB [%dx%d]-%d kvaddr=%p offset=%ld size=%zu\n",
 		      fb->width, fb->height, fb->depth, rk_obj->kvaddr,
 		      offset, size);
 
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
index 9c2d8a894093..059e902f872d 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
@@ -38,7 +38,7 @@ static int rockchip_gem_alloc_buf(struct rockchip_gem_object *rk_obj,
 					 &rk_obj->dma_addr, GFP_KERNEL,
 					 &rk_obj->dma_attrs);
 	if (!rk_obj->kvaddr) {
-		DRM_ERROR("failed to allocate %#x byte dma buffer", obj->size);
+		DRM_ERROR("failed to allocate %zu byte dma buffer", obj->size);
 		return -ENOMEM;
 	}
 
-- 
2.8.0.rc3.226.g39d4020

[toc] | [next] | [standalone]


#1418639

FromDoug Anderson <dianders@chromium.org>
Date2016-06-09 23:00 +0200
Message-ID<rIfdv-360-17@gated-at.bofh.it>
In reply to#1418535
Brian,

On Thu, Jun 9, 2016 at 10:46 AM, Brian Norris <briannorris@chromium.org> wrote:
> Rockchip DRM does not yet build properly for ARM64, but we might as well
> get the printf formatting correct now, to avoid the following warnings:
>
> drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c: In function 'rockchip_drm_fbdev_create':
> drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c:111:2: warning: format '%d' expects argument of type 'int', but argument 8 has type 'size_t' [-Wformat=]
>   DRM_DEBUG_KMS("FB [%dx%d]-%d kvaddr=%p offset=%ld size=%d\n",
>   ^
>
> drivers/gpu/drm/rockchip/rockchip_drm_gem.c: In function 'rockchip_gem_alloc_buf':
> drivers/gpu/drm/rockchip/rockchip_drm_gem.c:41:3: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'size_t' [-Wformat=]
>    DRM_ERROR("failed to allocate %#x byte dma buffer", obj->size);
>    ^
>
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> ---
>  drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 2 +-
>  drivers/gpu/drm/rockchip/rockchip_drm_gem.c   | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Douglas Anderson <dianders@chromium.org>

[toc] | [prev] | [next] | [standalone]


#1419478

FromDaniel Vetter <daniel@ffwll.ch>
Date2016-06-10 16:40 +0200
Message-ID<rIvLk-5JV-23@gated-at.bofh.it>
In reply to#1418639
On Thu, Jun 09, 2016 at 01:57:54PM -0700, Doug Anderson wrote:
> Brian,
> 
> On Thu, Jun 9, 2016 at 10:46 AM, Brian Norris <briannorris@chromium.org> wrote:
> > Rockchip DRM does not yet build properly for ARM64, but we might as well
> > get the printf formatting correct now, to avoid the following warnings:
> >
> > drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c: In function 'rockchip_drm_fbdev_create':
> > drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c:111:2: warning: format '%d' expects argument of type 'int', but argument 8 has type 'size_t' [-Wformat=]
> >   DRM_DEBUG_KMS("FB [%dx%d]-%d kvaddr=%p offset=%ld size=%d\n",
> >   ^
> >
> > drivers/gpu/drm/rockchip/rockchip_drm_gem.c: In function 'rockchip_gem_alloc_buf':
> > drivers/gpu/drm/rockchip/rockchip_drm_gem.c:41:3: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'size_t' [-Wformat=]
> >    DRM_ERROR("failed to allocate %#x byte dma buffer", obj->size);
> >    ^
> >
> > Signed-off-by: Brian Norris <briannorris@chromium.org>
> > ---
> >  drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 2 +-
> >  drivers/gpu/drm/rockchip/rockchip_drm_gem.c   | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> Reviewed-by: Douglas Anderson <dianders@chromium.org>

Applied to drm-misc, thanks.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

[toc] | [prev] | [next] | [standalone]


#1418968

FromCaesar Wang <wxt@rock-chips.com>
Date2016-06-10 03:00 +0200
Message-ID<rIiXL-5N6-1@gated-at.bofh.it>
In reply to#1418535

在 2016年06月10日 01:46, Brian Norris 写道:
> Rockchip DRM does not yet build properly for ARM64, but we might as well
> get the printf formatting correct now, to avoid the following warnings:
>
> drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c: In function 'rockchip_drm_fbdev_create':
> drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c:111:2: warning: format '%d' expects argument of type 'int', but argument 8 has type 'size_t' [-Wformat=]
>    DRM_DEBUG_KMS("FB [%dx%d]-%d kvaddr=%p offset=%ld size=%d\n",
>    ^
>
> drivers/gpu/drm/rockchip/rockchip_drm_gem.c: In function 'rockchip_gem_alloc_buf':
> drivers/gpu/drm/rockchip/rockchip_drm_gem.c:41:3: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'size_t' [-Wformat=]
>     DRM_ERROR("failed to allocate %#x byte dma buffer", obj->size);
>     ^
>
> Signed-off-by: Brian Norris <briannorris@chromium.org>

Tested-by: Caesar Wang <wxt@rock-chips.com>
> ---
>   drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 2 +-
>   drivers/gpu/drm/rockchip/rockchip_drm_gem.c   | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
> index f261512bb4a0..bab4cd18b6b0 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
> @@ -108,7 +108,7 @@ static int rockchip_drm_fbdev_create(struct drm_fb_helper *helper,
>   	fbi->screen_size = rk_obj->base.size;
>   	fbi->fix.smem_len = rk_obj->base.size;
>   
> -	DRM_DEBUG_KMS("FB [%dx%d]-%d kvaddr=%p offset=%ld size=%d\n",
> +	DRM_DEBUG_KMS("FB [%dx%d]-%d kvaddr=%p offset=%ld size=%zu\n",
>   		      fb->width, fb->height, fb->depth, rk_obj->kvaddr,
>   		      offset, size);
>   
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
> index 9c2d8a894093..059e902f872d 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
> @@ -38,7 +38,7 @@ static int rockchip_gem_alloc_buf(struct rockchip_gem_object *rk_obj,
>   					 &rk_obj->dma_addr, GFP_KERNEL,
>   					 &rk_obj->dma_attrs);
>   	if (!rk_obj->kvaddr) {
> -		DRM_ERROR("failed to allocate %#x byte dma buffer", obj->size);
> +		DRM_ERROR("failed to allocate %zu byte dma buffer", obj->size);
>   		return -ENOMEM;
>   	}
>   

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web