From patchwork Mon Jun 17 12:49:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10999197 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 657F614B6 for ; Mon, 17 Jun 2019 12:55:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 57325285D6 for ; Mon, 17 Jun 2019 12:55:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 54B3F2870B; Mon, 17 Jun 2019 12:55:24 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 00B0C2871A for ; Mon, 17 Jun 2019 12:55:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 98AD38921E; Mon, 17 Jun 2019 12:55:21 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 308 seconds by postgrey-1.36 at gabe; Mon, 17 Jun 2019 12:55:19 UTC Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 70F658921E for ; Mon, 17 Jun 2019 12:55:19 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPA (Nemesis) id 1MkpvV-1iL0zK3xWR-00mM5r; Mon, 17 Jun 2019 14:50:06 +0200 From: Arnd Bergmann To: "James (Qian) Wang" , Liviu Dudau , Brian Starkey , David Airlie , Daniel Vetter Subject: [PATCH] drm/komeda: fix size_t format string Date: Mon, 17 Jun 2019 14:49:18 +0200 Message-Id: <20190617125002.1312331-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:2IhlH3w9aK7OqAObh0m0vtxUjmwrTi/dYeLzaTbn3KHAugqPA8o upoUdMJZ1b6d3NEfaBcd6MZbAuwFtdZ71C++Eh5q12WN8vmMJUEXW6JIe/JpUrIXf++qqi6 v1bKA5Cxe/HV/9AQpRk7pZqnXeHebYbE+h+L9C19RjPK6emuttIEXdLD+XEnlU7+WS+0MgC JtVOPXXnWtvXeN4BfSoVg== X-UI-Out-Filterresults: notjunk:1;V03:K0:ti3Wa9oJNFg=:T3BYQRFe+rCQyihBF9RYY2 OM7UgegglZFjtKmZF9qIzP+OcafwlEvL/eOZzkY9RDbBE2+XkGAeiYF/9c8IA9NIXTdxVrCuM p0t8xnz7130HFUuhB3U9S1hPrD5dkBtGD0zdFm52GVoK76BZrwUFkmVMA8kGht25Dm8n+gbrY eXY0GgDVShlUhYFrckUPyIjtq6n7rs4hs686mRIUbS2VE539EgufYYJcHTR7di5E9x1aBWDn9 HBMbYSY64krOLeyTGOGaSVZFXpWi/Bcl89QL1KLh5Ox/qb8PST2bxswk+AIkVHamCcDw3v/bN Ipnh30re54cZTHOT7XF0z4/AOAA+egKMWRFJ2EWasnBo1YLsEmAaplSeYId3whJzAlIvBrB3v FIBrIKjUL093GoUVfS2JK35+mdkWia+MIwH239ubYEixDFuKN+D8zRjO38kaDgB83ePLu8JIk Kh1u6/WruWq5F8cpWcHnbHMR09e8+qXfCwZVIBazVF6zZ31hFtYfkzIoqT/zu0EQtexDSMKWR HiEUJF5swL5LEMNHMXArtXwBBJifabNbmgrFZ7ABBAh+yElkIQSDfkPjhxS3D2/QJkfi5bXkH v5Pm7hw7JfPC3ttGyHT9e3akotUim9JSIbM55PtBMGW1UCDJ2+u6dfCLWOM22V5kMGFQTENAL FPs0N3Zgp+o0dD//RENRbW17eNUlo2v6onthjCYoplwAtcr4Hf2IjxGPyaEfAUzvaiRFSlfFt kpLkeZHaGYi4HvqI0b+j1O5rMoJf4gggycjZww== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Lowry Li \(Arm Technology China\)" , dri-devel@lists.freedesktop.org, Arnd Bergmann , linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The debug output uses the wrong format string for printing a size_t: In file included from include/drm/drm_mm.h:49, from include/drm/drm_vma_manager.h:26, from include/drm/drm_gem.h:40, from drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c:9: drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c: In function 'komeda_fb_afbc_size_check': drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c:96:17: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Werror=format=] DRM_DEBUG_KMS("afbc size check failed, obj_size: 0x%lx. min_size 0x%x.\n", This is harmless in the kernel as size_t and long are always the same width, but it's always better to use the correct format string to shut up the warning. Fixes: 9ccf536e53cb ("drm/komeda: Added AFBC support for komeda driver") Signed-off-by: Arnd Bergmann Reviewed-by: James Qian Wang (Arm Technology China) --- drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c index abc8c0ccc053..58ff34e718d0 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c @@ -93,7 +93,7 @@ komeda_fb_afbc_size_check(struct komeda_fb *kfb, struct drm_file *file, AFBC_SUPERBLK_ALIGNMENT); min_size = kfb->afbc_size + fb->offsets[0]; if (min_size > obj->size) { - DRM_DEBUG_KMS("afbc size check failed, obj_size: 0x%lx. min_size 0x%x.\n", + DRM_DEBUG_KMS("afbc size check failed, obj_size: 0x%zx. min_size 0x%x.\n", obj->size, min_size); goto check_failed; } @@ -137,7 +137,7 @@ komeda_fb_none_afbc_size_check(struct komeda_dev *mdev, struct komeda_fb *kfb, min_size = komeda_fb_get_pixel_addr(kfb, 0, fb->height, i) - to_drm_gem_cma_obj(obj)->paddr; if (obj->size < min_size) { - DRM_DEBUG_KMS("The fb->obj[%d] size: %ld lower than the minimum requirement: %d.\n", + DRM_DEBUG_KMS("The fb->obj[%d] size: %zd lower than the minimum requirement: %d.\n", i, obj->size, min_size); return -EINVAL; }