diff options
| author | Tom Rini <[email protected]> | 2025-10-06 13:20:24 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-10-06 13:20:24 -0600 |
| commit | 0eaa4b337336dbbe93395d1f2ccc18937eaafea2 (patch) | |
| tree | c01e661d69181dceca68f56a4849a9bd04608521 /include/linux/kernel.h | |
| parent | e50b1e8715011def8aff1588081a2649a2c6cd47 (diff) | |
| parent | 4e4a9de31de2a5f395ee25c59e4026422fbcb27e (diff) | |
Merge branch 'next'
Merge the outstanding changes from the 'next' branch to master.
Diffstat (limited to 'include/linux/kernel.h')
| -rw-r--r-- | include/linux/kernel.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index e0443ecac84..44a639a5e4e 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -111,7 +111,19 @@ * lower_32_bits - return bits 0-31 of a number * @n: the number we're accessing */ -#define lower_32_bits(n) ((u32)(n)) +#define lower_32_bits(n) ((u32)((n) & 0xffffffff)) + +/** + * upper_16_bits - return bits 16-31 of a number + * @n: the number we're accessing + */ +#define upper_16_bits(n) ((u16)((n) >> 16)) + +/** + * lower_16_bits - return bits 0-15 of a number + * @n: the number we're accessing + */ +#define lower_16_bits(n) ((u16)((n) & 0xffff)) /* * abs() handles unsigned and signed longs, ints, shorts and chars. For all |
