Hi Geoff,

On Wed, Nov 30, 2011 at 02:38, Geoff Levand <[email protected]> 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 <[email protected]>
> ---
>  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 -- [email protected]

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
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to