[rtems-libbsd commit] linux: Move upper_32_bits() and lower_32_bits()

Sebastian Huber sebh at rtems.org
Mon Oct 23 07:27:51 UTC 2017


Module:    rtems-libbsd
Branch:    master
Commit:    9789434e2127185fad5ad2fa4f3eb219c6c698ec
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=9789434e2127185fad5ad2fa4f3eb219c6c698ec

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jun 27 09:31:34 2017 +0200

linux: Move upper_32_bits() and lower_32_bits()

---

 rtemsbsd/powerpc/include/asm/byteorder.h | 4 ++++
 rtemsbsd/powerpc/include/linux/kernel.h  | 4 ----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/rtemsbsd/powerpc/include/asm/byteorder.h b/rtemsbsd/powerpc/include/asm/byteorder.h
index 7168e49..53c4565 100644
--- a/rtemsbsd/powerpc/include/asm/byteorder.h
+++ b/rtemsbsd/powerpc/include/asm/byteorder.h
@@ -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_ */
diff --git a/rtemsbsd/powerpc/include/linux/kernel.h b/rtemsbsd/powerpc/include/linux/kernel.h
index 6fb6d8f..5f1ee2a 100644
--- a/rtemsbsd/powerpc/include/linux/kernel.h
+++ b/rtemsbsd/powerpc/include/linux/kernel.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




More information about the vc mailing list