From: Andrew Gabbasov Date: Tue, 27 Nov 2012 16:43:38 +0000 (+0100) Subject: Make upper bound of kernel version checking macro exclusive X-Git-Tag: v2.2.0-rc1~30 X-Git-Url: http://git.liburcu.org/?p=lttng-modules.git;a=commitdiff_plain;h=144bbfd57c21983409d77cdb283506b381fbfade Make upper bound of kernel version checking macro exclusive It's more usable to have the upper limit exclusive. It helps to avoid hardcoding of stable branch highest version number, i.e. having a range from 3.1.0 up to 3.2.0 (exclusively) gives us all 3.1.x versions. Signed-off-by: Andrew Gabbasov Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-kernel-version.h b/lttng-kernel-version.h index 280a398a..0eb56b38 100644 --- a/lttng-kernel-version.h +++ b/lttng-kernel-version.h @@ -27,10 +27,10 @@ /* * This macro checks if the kernel version is between the two specified - * versions (inclusive). + * versions (lower limit inclusive, upper limit exclusive). */ #define LTTNG_KERNEL_RANGE(a_low, b_low, c_low, a_high, b_high, c_high) \ (LINUX_VERSION_CODE >= KERNEL_VERSION(a_low, b_low, c_low) && \ - LINUX_VERSION_CODE <= KERNEL_VERSION(a_high, b_high, c_high)) + LINUX_VERSION_CODE < KERNEL_VERSION(a_high, b_high, c_high)) #endif /* _LTTNG_KERNEL_VERSION_H */