From patchwork Thu Feb 19 01:06:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 5849671 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 6A4569F536 for ; Thu, 19 Feb 2015 02:34:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 204542024C for ; Thu, 19 Feb 2015 02:34:15 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6105F20221 for ; Thu, 19 Feb 2015 02:34:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EAEF689C6B; Wed, 18 Feb 2015 18:34:09 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by gabe.freedesktop.org (Postfix) with ESMTP id 748CB6E030 for ; Wed, 18 Feb 2015 17:06:20 -0800 (PST) Received: by pabrd3 with SMTP id rd3so5447996pab.1 for ; Wed, 18 Feb 2015 17:06:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=V0ZODAC/bvkWaPVg5NzmdH3QHuzsX54Zi4Nw6BC2GZ4=; b=BqaQGw+0ICcG5xYKq5v8iS0u1FQpudEi81cVc+cuZljnh+0zrB/hCKqVn43Lckbiat EKsUeNq52PhO6JvOaJGY4YuCd+sstDnjua5dEnxkx5Ju2Md5tahvZGSceX9ID9bR0g22 v6djKtXklOkWOSjZ3p1CQClflwHHfpmuy8qUeNztp1KQch401elMKp7k9BmoNA7UXc7U fNV/8CD56EGo9gYPVeyZiOo5S/6urRKEGqiHhjPyAXpEZk/ouUlC//UqibwhgUdEIJU9 kCjhjR/3W7Z5kwW0AWCHVaXrUOr1mbzRC8k2I/y4Fo8BTMMb+bcor1piC2Vy89mfo3/h e1qQ== X-Received: by 10.68.132.229 with SMTP id ox5mr3413403pbb.94.1424307980251; Wed, 18 Feb 2015 17:06:20 -0800 (PST) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id rg6sm21799170pbc.43.2015.02.18.17.06.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Feb 2015 17:06:19 -0800 (PST) From: Magnus Damm To: dri-devel@lists.freedesktop.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 X-Mailman-Approved-At: Wed, 18 Feb 2015 18:34:09 -0800 Cc: laurent.pinchart+renesas@ideasonboard.com, Magnus Damm , linux-kernel@vger.kernel.org, linux-sh@vger.kernel.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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, 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 Acked-by: Geert Uytterhoeven --- 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);