On Fri, Mar 6, 2015 at 6:07 PM, <[email protected]> wrote:
> + unsigned long sec = get_seconds();
> + if (abs(sec - time->tv_sec) & ~7)
> time->tv_sec = sec;
It does strike me that instead of
abs(sec - time->tv_sec) & ~7
we could just do
(sec ^ time->tv_sec) & ~7
which just simply says "do the two values differ in any other bits
than the low three ones". Which is a lot easier to calculate.
It's not like this is some hugely performance-sensitive thing, of
course, so I guess nobody cares.
Linus
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html