linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ken Chen <kenchen@google.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	David Miller <davem@davemloft.net>,
	sparclinux <sparclinux@vger.kernel.org>,
	mingo@elte.hu, sfr@canb.auug.org.au,
	linux-kernel@vger.kernel.org, paulus@samba.org,
	tglx@linutronix.de, hpa@zytor.com, linux-next@vger.kernel.org
Subject: Re: [PATCH] sparc64: use unsigned long long for u64
Date: Tue, 23 Dec 2008 09:05:44 -0800	[thread overview]
Message-ID: <b040c32a0812230905q3a257163r35373b0cb50df35c@mail.gmail.com> (raw)
In-Reply-To: <20081223131746.GA7456@uranus.ravnborg.org>

On Tue, Dec 23, 2008 at 5:17 AM, Sam Ravnborg <sam@ravnborg.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@ravnborg.org>
> Cc: Andrew Morton <akpm@linux-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

  parent reply	other threads:[~2008-12-23 17:05 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-22  4:22 linux-next: sched tree build warning Stephen Rothwell
2008-12-22  6:47 ` Ingo Molnar
2008-12-22  6:49 ` Ken Chen
2008-12-22  7:04   ` Ingo Molnar
2008-12-22  7:19     ` Stephen Rothwell
2008-12-22  8:03       ` [patch] powerpc: change u64/s64 to a long long integer type Ingo Molnar
2008-12-22 22:43         ` Andrew Morton
2008-12-22 23:00           ` Sam Ravnborg
2008-12-22 23:03             ` H. Peter Anvin
2008-12-22 23:13               ` Sam Ravnborg
2008-12-22 23:13             ` Andrew Morton
2008-12-23 13:17               ` [PATCH] sparc64: use unsigned long long for u64 Sam Ravnborg
2008-12-23 14:42                 ` [PATCH] sparc64: fix unsigned long long warnings in drivers Sam Ravnborg
2008-12-23 17:05                 ` Ken Chen [this message]
2008-12-23 17:26                   ` [PATCH] sparc64: use unsigned long long for u64 Sam Ravnborg
2008-12-23 17:29                     ` Ken Chen
2008-12-23 17:34                       ` Sam Ravnborg
2008-12-27  8:54                 ` David Miller
2008-12-27  9:24                   ` Sam Ravnborg
2008-12-27  9:37                     ` David Miller
2008-12-27  9:49                       ` Sam Ravnborg
2008-12-28  4:25                         ` David Miller
2008-12-28 12:32                           ` Sam Ravnborg
2008-12-31  4:40         ` [patch] powerpc: change u64/s64 to a long long integer type Stephen Rothwell
2008-12-31  7:52           ` Ingo Molnar
2008-12-22  8:14     ` linux-next: sched tree build warning Paul Mackerras
2008-12-22  8:18       ` Ingo Molnar
2008-12-22  9:44         ` Paul Mackerras
2008-12-22 10:53           ` Ingo Molnar
2008-12-22 12:03             ` Paul Mackerras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b040c32a0812230905q3a257163r35373b0cb50df35c@mail.gmail.com \
    --to=kenchen@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=sam@ravnborg.org \
    --cc=sfr@canb.auug.org.au \
    --cc=sparclinux@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).