From: Caesar Wang <wxt@rock-chips.com>
To: Brian Norris <briannorris@chromium.org>,
Mark Yao <mark.yao@rock-chips.com>
Cc: Heiko Stuebner <heiko@sntech.de>, David Airlie <airlied@linux.ie>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-rockchip@lists.infradead.org,
Brian Norris <computersforpeace@gmail.com>
Subject: Re: [PATCH] drm/rockchip: fix compile warnings for 64-bit
Date: Fri, 10 Jun 2016 08:51:37 +0800 [thread overview]
Message-ID: <575A0F19.1040609@rock-chips.com> (raw)
In-Reply-To: <1465494392-92489-1-git-send-email-briannorris@chromium.org>
在 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;
> }
>
prev parent reply other threads:[~2016-06-10 0:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-09 17:46 [PATCH] drm/rockchip: fix compile warnings for 64-bit Brian Norris
2016-06-09 17:46 ` Brian Norris
2016-06-09 20:57 ` Doug Anderson
2016-06-09 20:57 ` Doug Anderson
2016-06-10 14:34 ` Daniel Vetter
2016-06-10 14:34 ` Daniel Vetter
2016-06-10 0:51 ` Caesar Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=575A0F19.1040609@rock-chips.com \
--to=wxt@rock-chips.com \
--cc=airlied@linux.ie \
--cc=briannorris@chromium.org \
--cc=computersforpeace@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mark.yao@rock-chips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.