linux: Move upper_32_bits() and lower_32_bits()

This commit is contained in:
Sebastian Huber
2017-06-27 09:31:34 +02:00
parent 65d6fa20fb
commit 9789434e21
2 changed files with 4 additions and 4 deletions

View File

@@ -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_ */

View File

@@ -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