kernel: Allow SYS_KERNEL_VER_MAJOR(), etc. return full range of values.
Macros SYS_KERNEL_VER_MAJOR(), SYS_KERNEL_VER_MINOR(), SYS_KERNEL_VER_PATCHLEVEL() capped their return values to 0-15 range, even though documentation says "Each of these elements must therefore be in the range 0 to 255, inclusive". Fix to corresponds to the docs. This issue especially affected SYS_KERNEL_VER_PATCHLEVEL(), which could be set to a high value to represent WIP code in-between releases. Change-Id: I0b72fb68f3f0f8d3d3b321a5ba2c48671879dfbc Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
parent
3ef74d4fea
commit
fb9185cdb8
|
@ -32,13 +32,13 @@ extern "C" {
|
|||
* x -- major release
|
||||
* y -- minor release
|
||||
* z -- patchlevel release
|
||||
* Each of these elements must therefore be in the range 0 to 256, inclusive.
|
||||
* Each of these elements must therefore be in the range 0 to 255, inclusive.
|
||||
*
|
||||
* Part 2: The least significant byte is reserved for future use.
|
||||
*/
|
||||
#define SYS_KERNEL_VER_MAJOR(ver) ((ver >> 24) & 0x0F)
|
||||
#define SYS_KERNEL_VER_MINOR(ver) ((ver >> 16) & 0x0F)
|
||||
#define SYS_KERNEL_VER_PATCHLEVEL(ver) ((ver >> 8) & 0x0F)
|
||||
#define SYS_KERNEL_VER_MAJOR(ver) ((ver >> 24) & 0xFF)
|
||||
#define SYS_KERNEL_VER_MINOR(ver) ((ver >> 16) & 0xFF)
|
||||
#define SYS_KERNEL_VER_PATCHLEVEL(ver) ((ver >> 8) & 0xFF)
|
||||
|
||||
/* kernel version routines */
|
||||
|
||||
|
|
Loading…
Reference in a new issue