From patchwork Thu Jun 9 17:46:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 9168701 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DC8F36048F for ; Fri, 10 Jun 2016 00:39:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFB252835E for ; Fri, 10 Jun 2016 00:39:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C495528369; Fri, 10 Jun 2016 00:39:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 590DB2835E for ; Fri, 10 Jun 2016 00:39:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 456B16EB98; Fri, 10 Jun 2016 00:38:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x22c.google.com (mail-pf0-x22c.google.com [IPv6:2607:f8b0:400e:c00::22c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 07A336E013 for ; Thu, 9 Jun 2016 17:46:57 +0000 (UTC) Received: by mail-pf0-x22c.google.com with SMTP id 62so15006235pfd.1 for ; Thu, 09 Jun 2016 10:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=sTsQYMxRxo62XB2DJqzvvHCfr9oJY7s5Q4hByc68caA=; b=N/iPHF4fCwq1Z24Mjj657Wni+gMToFWKs6ftyWPKgLkFBeWHPrJfCXnMsi53KFAyn+ WpjUpXuP8iuJmQdQeTxLX7oR9IgH6RBHo/7RhlZ4a5NVTOGmgZjSBNSw3wQmmfeSZjiT kMLfjpmutHBF3qmAnHdPaDAePlPgG+VhwLsSk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sTsQYMxRxo62XB2DJqzvvHCfr9oJY7s5Q4hByc68caA=; b=ESwYVlvt6oM5xBQQj6+yt6AZpooZH+o7jjqTfm0ozzEJKUDPbuvSSmypzTHO/3Tgmv mWAaM4eqpx62J1BAzCuRp+WX4IC+TMlFZCjFkgxxDsQK3dYndP2ELN4dsRxxxKJ43XmN z4cUysxxVQfWlHSYnBXY0VI0ELUMyzYNskF5+xc53U6E1TpsYtLl9HptY0thwIiA81l8 3M4uuk17+ymKkXGSlLVhAg9kJuSMiPv1JaOKDp4N8dfoEDT8ZjK1M95akijqozKFVuOQ fhGtERE9/s4TA4FAISoT+F+myrG+k2nkIFmAzZ+IvnI0auL6Bb0ee8eCwA5w5uS0sKvC QJYg== X-Gm-Message-State: ALyK8tKoU+0ehuyVcq4CyQuQ5DURqV0YkGmWiUORsv2BR+H4pabYnWqdMCgQt06EEwzmPRW1 X-Received: by 10.98.55.129 with SMTP id e123mr5629853pfa.145.1465494416194; Thu, 09 Jun 2016 10:46:56 -0700 (PDT) Received: from ban.mtv.corp.google.com ([172.22.64.120]) by smtp.gmail.com with ESMTPSA id f66sm11588754pfj.28.2016.06.09.10.46.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Jun 2016 10:46:55 -0700 (PDT) From: Brian Norris To: Mark Yao Subject: [PATCH] drm/rockchip: fix compile warnings for 64-bit Date: Thu, 9 Jun 2016 10:46:32 -0700 Message-Id: <1465494392-92489-1-git-send-email-briannorris@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 X-Mailman-Approved-At: Fri, 10 Jun 2016 00:37:37 +0000 Cc: Brian Norris , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, Brian Norris 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-Virus-Scanned: ClamAV using ClamSMTP 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 Tested-by: Caesar Wang --- 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; }