]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: use %pap format string for phys_addr_t
authorArnd Bergmann <arnd@arndb.de>
Mon, 8 Jan 2018 12:53:56 +0000 (13:53 +0100)
committerDave Airlie <airlied@redhat.com>
Tue, 9 Jan 2018 00:59:28 +0000 (10:59 +1000)
commit15dbe52d3f58492f14562de9637c84cc1f6876e2
treee8be5a962a86397a3cb2a7ac8d02369162c733f4
parentb170a603efbc02e319eb3aebe2f302a0fe78b267
drm/amdgpu: use %pap format string for phys_addr_t

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: 0f521c4c1c85 ("drm/amdgpu: Implement get_local_mem_info")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c