From patchwork Mon Jan 8 12:53:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10149379 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 8A20B602B3 for ; Mon, 8 Jan 2018 12:54:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B928285EE for ; Mon, 8 Jan 2018 12:54:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8023628618; Mon, 8 Jan 2018 12:54:54 +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 2638B285EE for ; Mon, 8 Jan 2018 12:54:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CC5E56E5DE; Mon, 8 Jan 2018 12:54:51 +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.126.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 100D96E5DE; Mon, 8 Jan 2018 12:54:49 +0000 (UTC) Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue006 [212.227.15.129]) with ESMTPA (Nemesis) id 0LeFQH-1fFGpT3gwX-00qBhn; Mon, 08 Jan 2018 13:54:43 +0100 From: Arnd Bergmann To: Oded Gabbay , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= Subject: [PATCH] drm/amdgpu: use %pap format string for phys_addr_t Date: Mon, 8 Jan 2018 13:53:56 +0100 Message-Id: <20180108125440.4052836-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:wZCPyzfalOBIhBfOC3DhFWwJTDmP8ZIYOY5ld7OlNqj2ZKjfKCQ wEgqAa+WF3SMT7qGgrsnBVe25bVKqPsOy+SRmzM0lFwRFqAeDMvwZE8fPOYaOOHvVuD1sBy vldqpSRXrbWGpIKcBbiUSaSaTK7PsGUPd5urM6Q9E2MyoFad8lhwsA0dx49pWwa7yLIA3Tp ecwgccA6Oj+drDcbp4iWg== X-UI-Out-Filterresults: notjunk:1; V01:K0:0XGiqsvujrY=:u6mbN5PFE/8Khu/Y68LB1i 6n2r1CrHaYN5JwxyB042BGKDbpd2olaMzOdexwKVNAFiLrW6sYKTWL92K0jASkHyx0pUZCOJd v3Y9VjnjzP1PzPevqxlgRrjIHuHU3/al5TsY0Y3TmUZFF+95mnWku5pXL0ppmxbVTm47HJfsM 0OR3R/6Hu3qdCYGGW8aE4wrVuPvG/0/u5AOKFPENPrGK9byqTr0G5FvMg3KnP6n90KqLQx2cf NF5yYCOEJnxSvQnmYZ5UgyLcJfC41kV6SiqLBjW57zDDG/0udMsZYrLPcratnyxau1dgiBoRt WvWf4xs2tboxhC2w/0rJ6wZQQ3EUsComvj6PdUr0xq5Mnpuatpk6gaL4LAZ5d52Sfipyq65Sj fNmr/FoawZVKpPvonqgSIxoZFTJ10O1B/66KQljoXVbbe4nyh/S5sCJbeuJwsVsAf6xSp9pgU fENPKrJnicyPDvDfB22G4Gpl+y4jzaZzxsZtumKWwYNEdvCXrEsyLgmrkbemgy4BydAmao/yd 4S75ayi86bQsaQScVFIAs+EuDlEh7N3zBFhyIvv2Mz3jskHKtBZUzqvMuNlB8Yxa3vwHhePOt qoeG2hMcNGSxCiyhsXQ/jll7njgZTNWihDIIUjXAErgkunlGSaAU7lCmMnWrZ/6wwEqVkHn6A nFIIHvxwxQUApMZm4nLqql5fm/AzB/fKVFKHUsyzN0JQGPO301mlr1W7QLSRpCpuEALq1PrSj XmYBvPf/qcYJh/OJUpgEsCw6Rx1MKoQ+3Q3jmg== Cc: Jay Cornwall , Arnd Bergmann , David Airlie , Felix Kuehling , Harish Kasiviswanathan , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Andres Rodriguez , Flora Cui , amd-gfx@lists.freedesktop.org, Kent Russell 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 newly added get_local_mem_info() function prints a phys_addr_t using 0x%llx, which is wrong on most 32-bit systems, as shown by this warning: drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c: In function 'get_local_mem_info': include/linux/kern_levels.h:5:18: error: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'resource_size_t {aka unsigned int}' [-Werror=format=] drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:297:31: note: format string is defined here pr_debug("Address base: 0x%llx limit 0x%llx public 0x%llx private 0x%llx\n", Passing the address by reference to the special %pap format string will produce the correct output and avoid the warning. Fixes: 30f1c0421ec5 ("drm/amdgpu: Implement get_local_mem_info") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c index 335e454e2ee1..1d605e1c1d66 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c @@ -294,8 +294,8 @@ void get_local_mem_info(struct kgd_dev *kgd, } mem_info->vram_width = adev->mc.vram_width; - pr_debug("Address base: 0x%llx limit 0x%llx public 0x%llx private 0x%llx\n", - adev->mc.aper_base, aper_limit, + pr_debug("Address base: %pap limit %pap public 0x%llx private 0x%llx\n", + &adev->mc.aper_base, &aper_limit, mem_info->local_mem_size_public, mem_info->local_mem_size_private);