Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752056AbYLWRF7 (ORCPT ); Tue, 23 Dec 2008 12:05:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751163AbYLWRFu (ORCPT ); Tue, 23 Dec 2008 12:05:50 -0500 Received: from smtp-out.google.com ([216.239.45.13]:13573 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751089AbYLWRFt (ORCPT ); Tue, 23 Dec 2008 12:05:49 -0500 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: cc:content-type:content-transfer-encoding; b=Icv161Nm3YzbBY5TFuP840XrkD7nAP7vRKSznBrPvGDFFtxLHIBFZRBxlAX0w1xgo VCiAAwUuKEijNTJM//NTw== MIME-Version: 1.0 In-Reply-To: <20081223131746.GA7456@uranus.ravnborg.org> References: <20081222152247.b934ed5b.sfr@canb.auug.org.au> <20081222070426.GD29160@elte.hu> <20081222181932.5dd9514e.sfr@canb.auug.org.au> <20081222080341.GA18897@elte.hu> <20081222144319.1bfc0061.akpm@linux-foundation.org> <20081222230035.GB4074@uranus.ravnborg.org> <20081222151338.3b6ef997.akpm@linux-foundation.org> <20081223131746.GA7456@uranus.ravnborg.org> Date: Tue, 23 Dec 2008 09:05:44 -0800 Message-ID: Subject: Re: [PATCH] sparc64: use unsigned long long for u64 From: Ken Chen To: Sam Ravnborg Cc: Andrew Morton , David Miller , sparclinux , 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 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1913 Lines: 60 On Tue, Dec 23, 2008 at 5:17 AM, Sam Ravnborg 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 > Cc: Andrew Morton > --- > > 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 > > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/