* [PATCH] ath11k: qmi: use %pad to format dma_addr_t
@ 2021-02-21 18:27 Geert Uytterhoeven
2021-02-24 6:37 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2021-02-21 18:27 UTC (permalink / raw)
To: Kalle Valo, David S . Miller, Jakub Kicinski
Cc: ath11k, linux-wireless, netdev, linux-kernel, Geert Uytterhoeven
If CONFIG_ARCH_DMA_ADDR_T_64BIT=n:
drivers/net/wireless/ath/ath11k/qmi.c: In function ‘ath11k_qmi_respond_fw_mem_request’:
drivers/net/wireless/ath/ath11k/qmi.c:1690:8: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘dma_addr_t’ {aka ‘unsigned int’} [-Wformat=]
1690 | "qmi req mem_seg[%d] 0x%llx %u %u\n", i,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1691 | ab->qmi.target_mem[i].paddr,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| dma_addr_t {aka unsigned int}
drivers/net/wireless/ath/ath11k/debug.h:64:30: note: in definition of macro ‘ath11k_dbg’
64 | __ath11k_dbg(ar, dbg_mask, fmt, ##__VA_ARGS__); \
| ^~~
drivers/net/wireless/ath/ath11k/qmi.c:1690:34: note: format string is defined here
1690 | "qmi req mem_seg[%d] 0x%llx %u %u\n", i,
| ~~~^
| |
| long long unsigned int
| %x
Fixes: d5395a5486596308 ("ath11k: qmi: add debug message for allocated memory segment addresses and sizes")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/net/wireless/ath/ath11k/qmi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
index 1aca841cd147cfee..7968fe4eda22a839 100644
--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
@@ -1687,8 +1687,8 @@ static int ath11k_qmi_respond_fw_mem_request(struct ath11k_base *ab)
req->mem_seg[i].size = ab->qmi.target_mem[i].size;
req->mem_seg[i].type = ab->qmi.target_mem[i].type;
ath11k_dbg(ab, ATH11K_DBG_QMI,
- "qmi req mem_seg[%d] 0x%llx %u %u\n", i,
- ab->qmi.target_mem[i].paddr,
+ "qmi req mem_seg[%d] %pad %u %u\n", i,
+ &ab->qmi.target_mem[i].paddr,
ab->qmi.target_mem[i].size,
ab->qmi.target_mem[i].type);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath11k: qmi: use %pad to format dma_addr_t
2021-02-21 18:27 [PATCH] ath11k: qmi: use %pad to format dma_addr_t Geert Uytterhoeven
@ 2021-02-24 6:37 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2021-02-24 6:37 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: David S . Miller, Jakub Kicinski, ath11k, linux-wireless, netdev,
linux-kernel, Geert Uytterhoeven
Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> If CONFIG_ARCH_DMA_ADDR_T_64BIT=n:
>
> drivers/net/wireless/ath/ath11k/qmi.c: In function ‘ath11k_qmi_respond_fw_mem_request’:
> drivers/net/wireless/ath/ath11k/qmi.c:1690:8: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘dma_addr_t’ {aka ‘unsigned int’} [-Wformat=]
> 1690 | "qmi req mem_seg[%d] 0x%llx %u %u\n", i,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 1691 | ab->qmi.target_mem[i].paddr,
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | |
> | dma_addr_t {aka unsigned int}
> drivers/net/wireless/ath/ath11k/debug.h:64:30: note: in definition of macro ‘ath11k_dbg’
> 64 | __ath11k_dbg(ar, dbg_mask, fmt, ##__VA_ARGS__); \
> | ^~~
> drivers/net/wireless/ath/ath11k/qmi.c:1690:34: note: format string is defined here
> 1690 | "qmi req mem_seg[%d] 0x%llx %u %u\n", i,
> | ~~~^
> | |
> | long long unsigned int
> | %x
>
> Fixes: d5395a5486596308 ("ath11k: qmi: add debug message for allocated memory segment addresses and sizes")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Patch applied to wireless-drivers.git, thanks.
ebb9d34e073d ath11k: qmi: use %pad to format dma_addr_t
--
https://patchwork.kernel.org/project/linux-wireless/patch/20210221182754.2071863-1-geert@linux-m68k.org/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-24 6:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-21 18:27 [PATCH] ath11k: qmi: use %pad to format dma_addr_t Geert Uytterhoeven
2021-02-24 6:37 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).