From patchwork Thu Aug 3 11:50:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9878805 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 B7C8B603F4 for ; Thu, 3 Aug 2017 11:52:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B0736288B8 for ; Thu, 3 Aug 2017 11:52:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A53F3288AC; Thu, 3 Aug 2017 11:52:16 +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.2 required=2.0 tests=BAYES_00, 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 44BD3288AC for ; Thu, 3 Aug 2017 11:52:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BA9406E176; Thu, 3 Aug 2017 11:52:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 28ACE6E16E; Thu, 3 Aug 2017 11:52:13 +0000 (UTC) Received: from wuerfel.lan ([78.43.238.10]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0M3SWO-1dLqLP3Flw-00r3CV; Thu, 03 Aug 2017 13:52:07 +0200 From: Arnd Bergmann To: Rob Clark Subject: [PATCH 3/3] drm/msm: use %z format modifier for printing size_t Date: Thu, 3 Aug 2017 13:50:48 +0200 Message-Id: <20170803115130.3448850-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170803115130.3448850-1-arnd@arndb.de> References: <20170803115130.3448850-1-arnd@arndb.de> X-Provags-ID: V03:K0:0J0JlQaB5s7IJfu0iU2nXSO+g7bZnDUrNUVpUczqD/oqHA70KwZ 1xA0wHtyUCp6F4ECNtUDIj4P+CALDElKDixtyFVYSVlSbv3O7eo4U4YUIA59V/eLrU6WW+H 7AClQSQWpgRL3GBS4Qlxt0cNYVqwJmKEg49q9vqEy2p9c0pBYTfCn66QEM9l4Klht5nWXUO dU7pmggIPQ8hpWrYd28RA== X-UI-Out-Filterresults: notjunk:1; V01:K0:PN6V2CDLm28=:DNcm+yj/crswO0l7B8xQts 21d/cgu53yL3RZfHMyj4R479lHnf1ystPK4c4589CRJIdRycRZxUTSd4kPhDfpz26JSeA2SFg O3Sc/Rq5MIpLCyZRBmC+dgQB0GfVsMGU2oKpYS1XLae5rbbR24tW4m3SPkyflUXzdOwfMP1dm uoWAmMBreos/F8LI0ygTG6sK/BVE8RnOZfbKxawKjhYT8uHN815OAVnw50+n2KdZU4HFBAy9p iq1YCCobYsPDRrZbTM3W7xbyX+NpYfM4okGCp6Yn/PD6HqrngQUL5pc4kqmldY6iOkCFDF9Rp 5I31RL/tPktPKjh3CuykXdr8qa61VPi1ElRj0Gb/Eb2384Fe8x08+vOR+g5grM8O8OVT3lTfE s2PpR+m82uv38JRdZfMhXwcT4rJljk4Z8/zKRewBh18ZjrRUJP47rF+bqZLg0IsJMmFiBTW2x TEmbdCH/Pm13dtQzehdN2aumm3rVF0WLp6bqDi+LZXHX6GWL0WXo+HTG+7LjnxuEbdVt8KIcM EulgDuGmEMjrV37dl3KqHeR7Qt3jBZQxfPldAobrcNQ23bT9nNkgR9JF0Hqtd/LK22tE9ojFQ Zuf9/Bq5ZpivuQSSKQV2IvDbHTIHW85aSvnYHlrmThu6uNE6/cl57ltnTTDyea9tTbQqvYt44 a2dFxQnA/oNSol6qMZNCUcJrM54BmjriY3xd3qiCzK8yqy9cS+CY8jGoLVvzHeLkz3a7wCYwp sa6YEwWpcjA534iLiLhrPVSoPkbznBvdpcBsKg== Cc: Arnd Bergmann , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.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-Virus-Scanned: ClamAV using ClamSMTP The return type of ARRAY_SIZE() is size_t, so we have to use %zu instead of %lu to avoid this warning: drivers/gpu/drm/msm/msm_gpu.c: In function 'msm_gpu_init': drivers/gpu/drm/msm/msm_gpu.c:742:31: error: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'unsigned int' [-Werror=format=] The warning it otherwise harmless as size_t is always the same size as unsigned long in all supported architectures, but gcc doesn't know that. Fixes: c2fceabca6d5 ("drm/msm: Support multiple ringbuffers") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/msm/msm_gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c index 1e44f8893490..66af5ac334ba 100644 --- a/drivers/gpu/drm/msm/msm_gpu.c +++ b/drivers/gpu/drm/msm/msm_gpu.c @@ -739,7 +739,7 @@ int msm_gpu_init(struct drm_device *drm, struct platform_device *pdev, } if (nr_rings > ARRAY_SIZE(gpu->rb)) { - DRM_DEV_INFO_ONCE(drm->dev, "Only creating %lu ringbuffers\n", + DRM_DEV_INFO_ONCE(drm->dev, "Only creating %zu ringbuffers\n", ARRAY_SIZE(gpu->rb)); nr_rings = ARRAY_SIZE(gpu->rb); }