From patchwork Mon May 4 14:16:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 6348641 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9C8529F374 for ; Wed, 6 May 2015 10:31:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C8E90202B4 for ; Wed, 6 May 2015 10:31:46 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4BC21202A1 for ; Wed, 6 May 2015 10:31:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 014578A239; Wed, 6 May 2015 03:31:42 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 300 seconds by postgrey-1.34 at gabe; Mon, 04 May 2015 07:21:28 PDT Received: from michel.telenet-ops.be (michel.telenet-ops.be [195.130.137.88]) by gabe.freedesktop.org (Postfix) with ESMTP id AEB4C6E3E0 for ; Mon, 4 May 2015 07:21:28 -0700 (PDT) Received: from ayla.of.borg ([84.193.93.87]) by michel.telenet-ops.be with bizsmtp id PqGR1q01C1t5w8s06qGRXH; Mon, 04 May 2015 16:16:26 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1YpHAX-0002Ho-QJ; Mon, 04 May 2015 16:16:25 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1YpHAX-000238-Pz; Mon, 04 May 2015 16:16:25 +0200 From: Geert Uytterhoeven To: David Airlie Subject: [PATCH] drm/cma: Fix 64-bit size_t build warnings Date: Mon, 4 May 2015 16:16:19 +0200 Message-Id: <1430748979-7845-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 06 May 2015 03:31:40 -0700 Cc: Magnus Damm , Geert Uytterhoeven , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Geert Uytterhoeven Reviewed-by: Thierry Reding --- drivers/gpu/drm/drm_gem_cma_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c index e419eedf751de6cb..bd75f303da63d9c6 100644 --- a/drivers/gpu/drm/drm_gem_cma_helper.c +++ b/drivers/gpu/drm/drm_gem_cma_helper.c @@ -110,7 +110,7 @@ struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm, 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_cma_object *cma_obj, 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);