[PATCH 10/11] mmc: sdhci-of-sparx5: Use proper printk format for dma_addr_t

Lars Povlsen lars.povlsen at microchip.com
Fri Sep 4 04:08:48 EDT 2020


Krzysztof Kozlowski writes:

> dma_addr_t size varies between architectures so use dedicated printk
> format to fix compile testing warning (e.g. on 32-bit MIPS):
>
>   drivers/mmc/host/sdhci-of-sparx5.c:63:11: warning:
>     format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘dma_addr_t {aka unsigned int}’ [-Wformat=]
>
> Signed-off-by: Krzysztof Kozlowski <krzk at kernel.org>
> ---
>  drivers/mmc/host/sdhci-of-sparx5.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-of-sparx5.c b/drivers/mmc/host/sdhci-of-sparx5.c
> index 14b5dad6575a..747f108a0ace 100644
> --- a/drivers/mmc/host/sdhci-of-sparx5.c
> +++ b/drivers/mmc/host/sdhci-of-sparx5.c
> @@ -60,8 +60,8 @@ static void sdhci_sparx5_adma_write_desc(struct sdhci_host *host, void **desc,
>                 return;
>         }
>
> -       pr_debug("%s: write_desc: splitting dma len %d, offset 0x%0llx\n",
> -                mmc_hostname(host->mmc), len, addr);
> +       pr_debug("%s: write_desc: splitting dma len %d, offset %pad\n",
> +                mmc_hostname(host->mmc), len, &addr);
>
>         offset = addr & (SZ_128M - 1);
>         tmplen = SZ_128M - offset;

Acked-by: Lars Povlsen <larc.povlsen at microchip.com>

-- 
Lars Povlsen,
Microchip



More information about the linux-amlogic mailing list