Re: [PATCH v2] sched: Fix print format for u64

From: Ingo Molnar
Date: Fri Jan 25 2013 - 03:06:50 EST



* Paul Turner <pjt@xxxxxxxxxx> wrote:

> On Thu, Jan 24, 2013 at 11:19 PM, Ingo Molnar <mingo@xxxxxxxxxx> wrote:
> >
> > * Fabio Estevam <festevam@xxxxxxxxx> wrote:
> >
> >> On Thu, Jan 24, 2013 at 12:19 PM, Ingo Molnar <mingo@xxxxxxxxxx> wrote:
> >>
> >> > I suppose - is this patch warning-free both on 64-bit and 32-bit
> >> > systems?
> >>
> >> Yes, just confirmed that this patch is warning-free on both 64-bit and
> >> 32-bit machines.
> >
> > Apparently it's not all good, see the warning attached below.
>
> Yeah this patch is broken; this is not properly fixable as is without
> #ifdefs (or fixing the insanity that is atomic64_read).
>
> Specifically:
>
> On some architectures (e.g. x86_64) atomic64_read is typed long
> On some others (e.g. x86-32) it's typed long long
> On yet others (e.g. arm) it's typed u64

Hm, cannot we type atomic64_read() to u64 on x86-64 as well, and
fix other architectures? How widespread is this problem, have
you checked that perhaps?

I'm all for clean, consistent types instead of #ifdef or
temporary variable uglies.

Thanks,

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