lkml.org 
[lkml]   [2011]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux 3.1-rc9
On Sun, 23 Oct 2011 13:34:22 +0200
Ingo Molnar <mingo@elte.hu> wrote:

>
> * Martin Schwidefsky <schwidefsky@de.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.



\
 
 \ /
  Last update: 2011-10-24 09:51    [from the cache]
©2003-2011 Jasper Spaans