From patchwork Wed Dec 23 07:36:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 7908971 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5CC0FBEEE5 for ; Wed, 23 Dec 2015 07:36:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6D9902041E for ; Wed, 23 Dec 2015 07:36:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6F130203E6 for ; Wed, 23 Dec 2015 07:36:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B8CC26E0A4; Tue, 22 Dec 2015 23:36:49 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by gabe.freedesktop.org (Postfix) with ESMTPS id 369A66E0A4 for ; Tue, 22 Dec 2015 23:36:48 -0800 (PST) Received: by mail-pa0-f47.google.com with SMTP id uo6so24412928pac.1 for ; Tue, 22 Dec 2015 23:36:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=1RCAjIXe6QOB1lt7r775o41dCQL9/xEtG0RqQntxoNc=; b=F1yj0cYvw3cO47VVHMjdSLXhwazPiX4ks7DTnhha9zfZKShhggS94WG6yQLGMAgE6r ubiEzEawmUwIOIk48vL0bY7elLqyZhIez+5Px1nwM1F5VUnUVvlNmPaj7gH52xHJKlZA 9hDUKaT/NkhDwjF75QTmLzsc/tevFPE/cfoRHDVh8naJmGdWBmjVwyGmVDIpxJymMl3D YAo68koEOcqqeJLyX/FYGHO6jmdEUhVKjBs2U/snW7xcVMOnTD6RAJlRbPBmbxZd7/kq KcyC9KUz7qB304eNdH0ocpOkqYp3AX4fffZQr1mUGRO//9cjtMmhp+tBh4wgvLF04Zxw yZBw== X-Received: by 10.66.193.36 with SMTP id hl4mr41850898pac.153.1450856207739; Tue, 22 Dec 2015 23:36:47 -0800 (PST) Received: from sudip-pc.vectortproxy.org ([49.206.205.82]) by smtp.gmail.com with ESMTPSA id ua8sm32423223pab.2.2015.12.22.23.36.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Dec 2015 23:36:47 -0800 (PST) From: Sudip Mukherjee To: David Airlie , Eric Anholt Subject: [PATCH] drm/vc4: fix build warning Date: Wed, 23 Dec 2015 13:06:38 +0530 Message-Id: <1450856198-27306-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Sudip Mukherjee 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, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 We were getting build warning: drivers/gpu/drm/vc4/vc4_validate.c: In function 'validate_gl_shader_rec': drivers/gpu/drm/vc4/vc4_validate.c:864:4: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' [-Wformat=] DRM_ERROR("BO offset overflow (%d + %d > %d)\n", vbo->base.size is size_t and for printing size_t we should be using %zu. Signed-off-by: Sudip Mukherjee Reviewed-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_validate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c index 0fb5b99..e26d9f6 100644 --- a/drivers/gpu/drm/vc4/vc4_validate.c +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -861,7 +861,7 @@ validate_gl_shader_rec(struct drm_device *dev, if (vbo->base.size < offset || vbo->base.size - offset < attr_size) { - DRM_ERROR("BO offset overflow (%d + %d > %d)\n", + DRM_ERROR("BO offset overflow (%d + %d > %zu)\n", offset, attr_size, vbo->base.size); return -EINVAL; }