Re: [PATCH] drm/etnaviv: fix '%x' warning

From: Lucas Stach
Date: Wed Jan 24 2018 - 06:57:31 EST


Hi Gustavo,

Am Dienstag, den 23.01.2018, 11:07 -0600 schrieb Gustavo A. R. Silva:
> Fix the following warning by using %zx instead of %x for variable of
> type size_t:
>
> warning: format â%xâ expects argument of type âunsigned intâ, but
> argument 4 has type âsize_t {aka long unsigned int}â [-Wformat=]
>
> Fixes: 50073cf98d16 ("drm/etnaviv: mmu: stop using iommu map/unmap functions")
> Signed-off-by: Gustavo A. R. Silva <gustavo@xxxxxxxxxxxxxx>

Thanks for the patch, but I already have an equivalent change queued up.

Regards,
Lucas

> ---
> This code was compiled with GCC 7.2.0
>
> Âdrivers/gpu/drm/etnaviv/etnaviv_mmu.c | 4 ++--
> Â1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
> index d113fe0..49e0497 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
> @@ -29,7 +29,7 @@ static void etnaviv_domain_unmap(struct etnaviv_iommu_domain *domain,
> > Â size_t pgsize = SZ_4K;
> Â
> > Â if (!IS_ALIGNED(iova | size, pgsize)) {
> > - pr_err("unaligned: iova 0x%lx size 0x%zx min_pagesz 0x%x\n",
> > + pr_err("unaligned: iova 0x%lx size 0x%zx min_pagesz 0x%zx\n",
> > Â ÂÂÂÂÂÂÂiova, size, pgsize);
> > Â return;
> > Â }
> @@ -54,7 +54,7 @@ static int etnaviv_domain_map(struct etnaviv_iommu_domain *domain,
> > Â int ret = 0;
> Â
> > Â if (!IS_ALIGNED(iova | paddr | size, pgsize)) {
> > - pr_err("unaligned: iova 0x%lx pa %pa size 0x%zx min_pagesz 0x%x\n",
> > + pr_err("unaligned: iova 0x%lx pa %pa size 0x%zx min_pagesz 0x%zx\n",
> > Â ÂÂÂÂÂÂÂiova, &paddr, size, pgsize);
> > Â return -EINVAL;
> > Â }