]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ath11k: qmi: use %pad to format dma_addr_t
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 21 Feb 2021 18:27:54 +0000 (19:27 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 24 Feb 2021 06:37:13 +0000 (08:37 +0200)
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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210221182754.2071863-1-geert@linux-m68k.org
drivers/net/wireless/ath/ath11k/qmi.c

index 1aca841cd147cfee6dedb59b6e08b38201257dfb..7968fe4eda22a839d80e4ed5b2220d857598d4ca 100644 (file)
@@ -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);
                }