• john stultz's avatar
    [PATCH] NTP shift_right cleanup · 1bb34a41
    john stultz authored
    Create a macro shift_right() that avoids the numerous ugly conditionals in the
    NTP code that look like:
    
            if(a < 0)
                    b = -(-a >> shift);
            else
                    b = a >> shift;
    
    Replacing it with:
    
            b = shift_right(a, shift);
    
    This should have zero effect on the logic, however it should probably have
    a bit of testing just to be sure.
    
    Also replace open-coded min/max with the macros.
    
    Signed-off-by : John Stultz <johnstul@us.ibm.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    1bb34a41
timer.c 42.3 KB