Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755675AbbBSBGj (ORCPT ); Wed, 18 Feb 2015 20:06:39 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:46518 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754697AbbBSBGU (ORCPT ); Wed, 18 Feb 2015 20:06:20 -0500 From: Magnus Damm To: dri-devel@lists.freedesktop.org Cc: airlied@linux.ie, Magnus Damm , laurent.pinchart+renesas@ideasonboard.com, linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org Date: Thu, 19 Feb 2015 10:06:39 +0900 Message-Id: <20150219010639.1654.35019.sendpatchset@little-apple> Subject: [PATCH] drm/cma: Fix 64-bit size_t build warnings Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1863 Lines: 43 From: Magnus Damm Fix warnings related to size_t when building for 64-bit architectures: drivers/gpu/drm/drm_gem_cma_helper.c: In function ‘drm_gem_cma_create’: drivers/gpu/drm/drm_gem_cma_helper.c:114:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat=] size); ^ drivers/gpu/drm/drm_gem_cma_helper.c: In function ‘drm_gem_cma_describe’: drivers/gpu/drm/drm_gem_cma_helper.c:393:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘size_t’ [-Wformat=] off, &cma_obj->paddr, cma_obj->vaddr, obj->size); Signed-off-by: Magnus Damm --- drivers/gpu/drm/drm_gem_cma_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- 0001/drivers/gpu/drm/drm_gem_cma_helper.c +++ work/drivers/gpu/drm/drm_gem_cma_helper.c 2015-02-19 06:29:39.155526831 +0900 @@ -110,7 +110,7 @@ struct drm_gem_cma_object *drm_gem_cma_c cma_obj->vaddr = dma_alloc_writecombine(drm->dev, size, &cma_obj->paddr, GFP_KERNEL | __GFP_NOWARN); if (!cma_obj->vaddr) { - dev_err(drm->dev, "failed to allocate buffer with size %d\n", + dev_err(drm->dev, "failed to allocate buffer with size %zu\n", size); ret = -ENOMEM; goto error; @@ -388,7 +388,7 @@ void drm_gem_cma_describe(struct drm_gem off = drm_vma_node_start(&obj->vma_node); - seq_printf(m, "%2d (%2d) %08llx %pad %p %d", + seq_printf(m, "%2d (%2d) %08llx %pad %p %zu", obj->name, obj->refcount.refcount.counter, off, &cma_obj->paddr, cma_obj->vaddr, obj->size); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/