[lttng-dev] [PATCH lttng-modules] Make upper bound of kernel version checking macro exclusive

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Tue Nov 27 11:45:33 EST 2012


* Andrew Gabbasov (andrew_gabbasov at mentor.com) wrote:
> 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.
> 

Merged, thanks!

Mathieu

> Signed-off-by: Andrew Gabbasov <andrew_gabbasov at mentor.com>
> ---
>  lttng-kernel-version.h |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lttng-kernel-version.h b/lttng-kernel-version.h
> index 280a398..0eb56b3 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 */
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list