From: Michael Jeanson Date: Mon, 8 Feb 2021 20:32:47 +0000 (-0500) Subject: fix: RT_PATCH_VERSION is close to overflow X-Git-Tag: v2.11.8~7 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d8f24060ae917a0abaefbcde53d0c8f8f4df9a9a;p=lttng-modules.git fix: RT_PATCH_VERSION is close to overflow We allocated only 8bits for RT_PATCH_VERSION in LTTNG_RT_VERSION_CODE, the current RT patch version for the 4.4 branch is currently 214 which is getting close to 256. Bump it to 16bits to avoid breakage in the future. Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers Change-Id: I70d4794b1a42a54fce5f801c9245354cbf54d975 --- diff --git a/lttng-kernel-version.h b/lttng-kernel-version.h index 2044203a..9ce339b1 100644 --- a/lttng-kernel-version.h +++ b/lttng-kernel-version.h @@ -170,11 +170,11 @@ /* RT patch */ #define LTTNG_RT_KERNEL_VERSION(a, b, c, d) \ - (((LTTNG_KERNEL_VERSION(a, b, c)) << 8) + (d)) + (((LTTNG_KERNEL_VERSION(a, b, c)) << 16) + (d)) #ifdef RT_PATCH_VERSION #define LTTNG_RT_VERSION_CODE \ - ((LTTNG_LINUX_VERSION_CODE << 8) + RT_PATCH_VERSION) + ((LTTNG_LINUX_VERSION_CODE << 16) + RT_PATCH_VERSION) #else #define LTTNG_RT_VERSION_CODE 0 #endif