[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111024094817.30c01c9b@de.ibm.com>
Date: Mon, 24 Oct 2011 09:48:17 +0200
From: Martin Schwidefsky <schwidefsky@...ibm.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Simon Kirby <sim@...tway.ca>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Dave Jones <davej@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: Linux 3.1-rc9
On Sun, 23 Oct 2011 13:34:22 +0200
Ingo Molnar <mingo@...e.hu> wrote:
>
> * Martin Schwidefsky <schwidefsky@...ibm.com> 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,
Martin.
"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@...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