Re: [PATCH] ntp: Fixup adjtimex freq validation on 32bit systems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 03, 2015 at 10:57:38AM -0800, John Stultz wrote:
> Unfortunately the patch used LONG_MAX/MIN instead of
> LLONG_MAX/MIN, which was fine on 64bit systems, but being
> much smaller on 32bit systems caused false positives
> resulting in most direct frequency adjustments to fail w/
> EINVAL.

...

> One note:
> 0day kbuild bot complains about
> >> kernel/time/ntp.c:637: warning: comparison is always false due to limited range of data type
> >> kernel/time/ntp.c:639: warning: comparison is always false due to limited range of data type
> 
> We could fix this via adding an extra (BITS_PER_LONG == 64)
> case before we check these to avoid it, but that seemed a
> bit too ugly to me. Thoughts?

So the check is 64 bit only?  Might as well mark it like that
explicitly to avoid needless head scratching of 32 bit people.

Thanks,
Richard
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]