Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2491317ybi; Mon, 17 Jun 2019 05:52:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqySvENHnKBWLamu5iaarHDJ4d+VvSlNhNQDoi8j9KvesemfJDnQ7sfkKLS4C2Q/CxOFEcFs X-Received: by 2002:a62:e20b:: with SMTP id a11mr440183pfi.0.1560775946909; Mon, 17 Jun 2019 05:52:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560775946; cv=none; d=google.com; s=arc-20160816; b=WeRbhXS+39L15KcS86kuTljkLN16FJpj3DBcTUgSP9+vbZZpylsQGzHyUHxlnXX7Ny NN6KnCy+kwslI2CAkNQBy2xnbFb1rX2jUG4Ln39ycG4h/5dIxq/AYbl41uq4gA2VjIbC ms9iC7udfWHxj4NxtBuU3hGyxdin2GrUVxCf9rrRSmTlAWzgm788+ZXzwrLLfSI2kMng hEYtLxJoh7MAGoZO2w+B7O+EG0sthGc7qfa9qp1Xlko6Z7ipUvz4lZi6h1F3Pqq1ZW5N R23SgbVr/2RNC0ucxQMW5sqYTVZRLxx5jsBi98XPO4/0IpBmZLaO8HFvBLLTuXWj0AH6 tYvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=vcY9Ih3BfKVAQhH/BBztZjAXAFytNE432IVw2A0PH+s=; b=EeNGOStzcg8SXd7yGTtq1wIgoAn7VFeAuIcXRpEWMn1CcQWRblV/rF7PqCk0mbNv/o duaK4ewnn+me15yT/h2PJJYmjovyuA2mt3OS+dbc6uAX0pCHoPNa+sWy79DbzSyxs3Cp 39/8W7i++EK1J1RiNZhq73SEvhXe/3rW3sD8q744dWaZeEwa2TxbAjglAk5+1g1ip0LX qvLyhtyTlh1wNRDQxGVzZiRhAni7ePMTBT8h7XC/rhHkd8rPqBN2YZEzN+C2ALxNHtPZ 7X1FLHKNwDKV13F9JWhmudK/Ga/ZU1aPZ0GK/3cA+3B7gizkzdfcSmFD63/Fev+FUN3u KQYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b69si10051140pjc.104.2019.06.17.05.52.10; Mon, 17 Jun 2019 05:52:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727463AbfFQMuN (ORCPT + 99 others); Mon, 17 Jun 2019 08:50:13 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:41345 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726834AbfFQMuM (ORCPT ); Mon, 17 Jun 2019 08:50:12 -0400 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 Cc: Arnd Bergmann , "Lowry Li (Arm Technology China)" , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org 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 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1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ender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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; } -- 2.20.0