Commit f62fa0ce authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Oded Gabbay

habanalabs: use %pad for printing a dma_addr_t

dma_addr_t might be different sizes depending on the configuration,
so we cannot print it as %llx:

drivers/misc/habanalabs/goya/goya.c: In function 'goya_sw_init':
drivers/misc/habanalabs/goya/goya.c:698:21: error: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'} [-Werror=format=]

Use the special %pad format string. This requires passing the
argument by reference.

Fixes: 2a51558c ("habanalabs: remove DMA mask hack for Goya")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
parent c8917b8f
...@@ -695,8 +695,8 @@ static int goya_sw_init(struct hl_device *hdev) ...@@ -695,8 +695,8 @@ static int goya_sw_init(struct hl_device *hdev)
goto free_dma_pool; goto free_dma_pool;
} }
dev_dbg(hdev->dev, "cpu accessible memory at bus address 0x%llx\n", dev_dbg(hdev->dev, "cpu accessible memory at bus address %pad\n",
hdev->cpu_accessible_dma_address); &hdev->cpu_accessible_dma_address);
hdev->cpu_accessible_dma_pool = gen_pool_create(ilog2(32), -1); hdev->cpu_accessible_dma_pool = gen_pool_create(ilog2(32), -1);
if (!hdev->cpu_accessible_dma_pool) { if (!hdev->cpu_accessible_dma_pool) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment