Skip to content

Commit

Permalink
remoteproc: stm32: fix phys_addr_t format string
Browse files Browse the repository at this point in the history
commit 3e25e40 upstream.

A phys_addr_t may be wider than an int or pointer:

drivers/remoteproc/stm32_rproc.c: In function 'stm32_rproc_da_to_pa':
drivers/remoteproc/stm32_rproc.c:583:30: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'phys_addr_t' {aka 'long long unsigned int'} [-Werror=format=]
  583 |                 dev_dbg(dev, "da %llx to pa %#x\n", da, *pa);

Print it by reference using the special %pap format string.

Reviewed-by: Arnaud Pouliquen <[email protected]>
Fixes: 8a47139 ("remoteproc: stm32: Move resource table setup to rproc_ops")
Signed-off-by: Arnd Bergmann <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
arndb authored and Sasha Levin committed Mar 26, 2024
1 parent a943eb8 commit 5148026
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/remoteproc/stm32_rproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ static int stm32_rproc_da_to_pa(struct rproc *rproc,
continue;

*pa = da - p_mem->dev_addr + p_mem->bus_addr;
dev_dbg(dev, "da %llx to pa %#x\n", da, *pa);
dev_dbg(dev, "da %llx to pa %pap\n", da, pa);

return 0;
}
Expand Down

0 comments on commit 5148026

Please sign in to comment.