lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b040c32a0812230905q3a257163r35373b0cb50df35c@mail.gmail.com>
Date:	Tue, 23 Dec 2008 09:05:44 -0800
From:	Ken Chen <kenchen@...gle.com>
To:	Sam Ravnborg <sam@...nborg.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	David Miller <davem@...emloft.net>,
	sparclinux <sparclinux@...r.kernel.org>, mingo@...e.hu,
	sfr@...b.auug.org.au, linux-kernel@...r.kernel.org,
	paulus@...ba.org, tglx@...utronix.de, hpa@...or.com,
	linux-next@...r.kernel.org
Subject: Re: [PATCH] sparc64: use unsigned long long for u64

On Tue, Dec 23, 2008 at 5:17 AM, Sam Ravnborg <sam@...nborg.org> wrote:
> Andrew Morton wrote:
>
>    People keep on doing
>
>            printk("%llu", some_u64);
>
>    testing it only on x86_64 and this generates a warning storm on
>    powerpc, sparc64, etc.  Because they use `long', not `long long'.
>
>    Quite a few 64-bit architectures are using `long' for their
>    s64/u64 types.  We should convert them all to `long long'.
>
> Update types.h so we use unsigned long long for u64 and
> fix all warnings in sparc64 code.
> Tested with an allnoconfig, defconfig and allmodconfig builds.
>
> This patch introduces additional warnings in several drivers.
> These will be dealt with in separate patches.
>
> Signed-off-by: Sam Ravnborg <sam@...nborg.org>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> ---
>
> It may take a few days before the drivers gets fixed.
> Christmas is approaching fast by now.
>
>        Sam
>
> diff --git a/arch/sparc/include/asm/timer_64.h b/arch/sparc/include/asm/timer_64.h
> index 5b779fd..ef3c368 100644
> --- a/arch/sparc/include/asm/timer_64.h
> +++ b/arch/sparc/include/asm/timer_64.h
> @@ -10,7 +10,7 @@
>  #include <linux/init.h>
>
>  struct sparc64_tick_ops {
> -       unsigned long (*get_tick)(void);
> +       unsigned long long (*get_tick)(void);

wait, why does this need to be changed?


People having problem with:

        u64 data;
        seq_printf(m, "%llu ", data);

This compiles fine with arch that defines u64 to unsigned long long
(like x86), but generate compile time warning on arch that defines u64
to unsigned long.

Isn't that you just need to convert format string to %llu for u64 type?

- Ken
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ