mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 10:27:12 +08:00
linux: Move upper_32_bits() and lower_32_bits()
This commit is contained in:
@@ -91,4 +91,8 @@ be16_add_cpu(u16 *var, u16 val)
|
||||
*var = cpu_to_be16(be16_to_cpu(*var) + val);
|
||||
}
|
||||
|
||||
#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
|
||||
|
||||
#define lower_32_bits(n) ((u32)(n))
|
||||
|
||||
#endif /* _ASM_BYTEORDER_H_ */
|
||||
|
@@ -182,10 +182,6 @@ int __must_check kstrtoint(const char *, unsigned int, int *);
|
||||
#define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max)
|
||||
#define clamp(x, lo, hi) min( max(x,lo), hi)
|
||||
|
||||
#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
|
||||
|
||||
#define lower_32_bits(n) ((u32)(n))
|
||||
|
||||
/*
|
||||
* This looks more complex than it should be. But we need to
|
||||
* get the type for the ~ right in round_down (it needs to be
|
||||
|
Reference in New Issue
Block a user