Commit d09f53a735bae43806a77754312a45d3f1198342
Committed by
Ohad Ben-Cohen
1 parent
7168d914a7
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
remoteproc: Fix use of format specifyer
The dma_addr_t type can be either u32 or u64 depending on the configuration. We should use a format specifyer for the larger type and explicitly cast to it. Sparse warnings: drivers/remoteproc/remoteproc_core.c:234:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat] drivers/remoteproc/remoteproc_core.c:596:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘dma_addr_t’ [-Wformat] drivers/remoteproc/remoteproc_core.c:634:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘dma_addr_t’ [-Wformat] Signed-off-by: Emil Goode <emilgoode@gmail.com> [fix commit log typos] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Showing 1 changed file with 6 additions and 4 deletions Side-by-side Diff
drivers/remoteproc/remoteproc_core.c
... | ... | @@ -231,8 +231,8 @@ |
231 | 231 | /* Store largest notifyid */ |
232 | 232 | rproc->max_notifyid = max(rproc->max_notifyid, notifyid); |
233 | 233 | |
234 | - dev_dbg(dev, "vring%d: va %p dma %x size %x idr %d\n", i, va, | |
235 | - dma, size, notifyid); | |
234 | + dev_dbg(dev, "vring%d: va %p dma %llx size %x idr %d\n", i, va, | |
235 | + (unsigned long long)dma, size, notifyid); | |
236 | 236 | |
237 | 237 | rvring->va = va; |
238 | 238 | rvring->dma = dma; |
... | ... | @@ -586,7 +586,8 @@ |
586 | 586 | goto free_carv; |
587 | 587 | } |
588 | 588 | |
589 | - dev_dbg(dev, "carveout va %p, dma %x, len 0x%x\n", va, dma, rsc->len); | |
589 | + dev_dbg(dev, "carveout va %p, dma %llx, len 0x%x\n", va, | |
590 | + (unsigned long long)dma, rsc->len); | |
590 | 591 | |
591 | 592 | /* |
592 | 593 | * Ok, this is non-standard. |
... | ... | @@ -631,7 +632,8 @@ |
631 | 632 | mapping->len = rsc->len; |
632 | 633 | list_add_tail(&mapping->node, &rproc->mappings); |
633 | 634 | |
634 | - dev_dbg(dev, "carveout mapped 0x%x to 0x%x\n", rsc->da, dma); | |
635 | + dev_dbg(dev, "carveout mapped 0x%x to 0x%llx\n", | |
636 | + rsc->da, (unsigned long long)dma); | |
635 | 637 | } |
636 | 638 | |
637 | 639 | /* |