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: 123705 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2686615qgn; Mon, 8 Jan 2018 04:54:55 -0800 (PST) X-Google-Smtp-Source: ACJfBoumZxN+F4BAKmsCqS0f1YfrZXDpuVkVIxvtE9DyIRr5KLBEJ5OviXdH16wDMKlLQUR2GN/M X-Received: by 10.99.110.10 with SMTP id j10mr9380849pgc.312.1515416095789; Mon, 08 Jan 2018 04:54:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515416095; cv=none; d=google.com; s=arc-20160816; b=sxCMywC8QwaMCr6eRPdcl+3iso09uEoGY7fXvMrEe67sM9iYhrTzBKZxE12yAJFinu RCE7qy2oiMcvGQ73S/Yt64if3fricUnW6C0mQZjS0TPIC2M48NdtEJ+0wepx82QRNiV2 GWO8bqGEMcMSb83CANyMKL1R1CsXfwiyCNPRlpQbIX0etP4MSrJBJXUaknnz2th+VrD9 BXOs2t3vg7rGRo8G6o95XRH6ChNTl4YAVgoGpoaV+RW9/TAS1LWbw0CCYH04KhW4IfMJ oitxZFNaDTNG5lZpfjLrrB2o6o6z4hOhpAHAuSUMUkH2TM3aegnUdSza/K1xeRnuzzsD QK0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Oloedcq9Oy6ovUYczl+QebZI15mIF/moJLQBh/1y3F4=; b=O7qwr+X464/fXQyAX0Tn3xjpu2rM9qZGDr0BSyhgJ8W3KGpunJ4RB21Bpg9otaHo5p LJjBltOqIWOOe2DTRQ3za5FH4ZgEweiuGmZFIZFobx15dp627NhA3FQQPBYufpMvGd/x G6Ynr4Ea0adS6UMhSKx3l7M60iK2/W1fATDWmyGW404MKTD/uH3/dO6J+aT81IP0WEZH cDmnW1R1FDOxSvuDtq5+iMmTXy8QRO+RpCCIO5zIsCY7oRZdfZoC0dU0Yy4fFYSqZ4z0 HdiL3IDXUhbnXoocylwHmNtHzYv7fLVLoJiRU8OML3pzj1QVRaIoZ7jq+6k4oa0lj+5n pV3A== 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 f3si4775704plf.603.2018.01.08.04.54.55; Mon, 08 Jan 2018 04:54:55 -0800 (PST) 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 S1757472AbeAHMyy (ORCPT + 28 others); Mon, 8 Jan 2018 07:54:54 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:62059 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756518AbeAHMyw (ORCPT ); Mon, 8 Jan 2018 07:54:52 -0500 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_K=C3=B6nig?= Cc: Arnd Bergmann , David Airlie , Felix Kuehling , Harish Kasiviswanathan , Andres Rodriguez , Kent Russell , Jay Cornwall , Flora Cui , dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org 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== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.9.0 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);