Re: Linux 3.1-rc9

From: Martin Schwidefsky
Date: Mon Oct 24 2011 - 03:48:27 EST

On Sun, 23 Oct 2011 13:34:22 +0200
Ingo Molnar <mingo@xxxxxxx> wrote:

> * Martin Schwidefsky <schwidefsky@xxxxxxxxxx> wrote:
> > +#define cputime_zero ((__force cputime_t) 0ULL)
> > +#define cputime64_zero ((__force cputime64_t) 0ULL)
> Hm, why are these still needed?
> This:
> if (*newval == cputime_zero)
> return;
> Could be written as the much simpler:
> if (!*newval)
> return;
> with no ill effect that i can see.

These types are still there because cputime_t can be u32 or u64. E.g. this

timer->expires.cpu = 0;

will give the following sparse warning

kernel/posix-cpu-timers.c:463:46: warning: implicit cast to nocast type

if you architecture happens to have a u64 as cputime_t.
We could get rid of cputime64_t as it always should be a u64. To keep
things symmetrical I choose to keep both defines.

blue skies,

"Reality continues to ruin my life." - Calvin.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at