Hi Geoff,

On Wed, Nov 30, 2011 at 02:38, Geoff Levand <ge...@infradead.org> wrote:
> Fix some PS3 build warnings when DEBUG is defined.
>
> Fixes warnings like these:
>
>  format '%lx' expects type 'long unsigned int', but argument 7 has type 'u64'
>
> Signed-off-by: Geoff Levand <ge...@infradead.org>
> ---
>  arch/powerpc/platforms/ps3/repository.c |   14 ++++++++------
>  1 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/arch/powerpc/platforms/ps3/repository.c 
> b/arch/powerpc/platforms/ps3/repository.c
> index cb68729..2ce2782 100644
> --- a/arch/powerpc/platforms/ps3/repository.c
> +++ b/arch/powerpc/platforms/ps3/repository.c
> @@ -1050,7 +1050,7 @@ int ps3_repository_dump_resource_info(const struct 
> ps3_repository_device *repo)
>
>                pr_debug("%s:%d (%u:%u) reg_type %u, bus_addr %lxh, len 
> %lxh\n",
>                        __func__, __LINE__, repo->bus_index, repo->dev_index,
> -                       reg_type, bus_addr, len);
> +                       reg_type, (unsigned long)bus_addr, (unsigned 
> long)len);
>        }
>
>        pr_debug(" <- %s:%d\n", __func__, __LINE__);

The correct way to format u64 is using the "ll" length modifier. That way you
don't need casts.

The code above was originally written before the u64 uniformization, when ppc64
was still using "unsigned long" for u64.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to