Skip to content

Commit f62fa0c

Browse files
arndbogabbay
authored andcommitted
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: 2a51558 ("habanalabs: remove DMA mask hack for Goya") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
1 parent c8917b8 commit f62fa0c

File tree

1 file changed

+2
-2
lines changed
  • drivers/misc/habanalabs/goya

1 file changed

+2
-2
lines changed

drivers/misc/habanalabs/goya/goya.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,8 +695,8 @@ static int goya_sw_init(struct hl_device *hdev)
695695
goto free_dma_pool;
696696
}
697697

698-
dev_dbg(hdev->dev, "cpu accessible memory at bus address 0x%llx\n",
699-
hdev->cpu_accessible_dma_address);
698+
dev_dbg(hdev->dev, "cpu accessible memory at bus address %pad\n",
699+
&hdev->cpu_accessible_dma_address);
700700

701701
hdev->cpu_accessible_dma_pool = gen_pool_create(ilog2(32), -1);
702702
if (!hdev->cpu_accessible_dma_pool) {

0 commit comments

Comments
 (0)