[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/8] fdt: Use bswapN instead of bswap_N
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 1/8] fdt: Use bswapN instead of bswap_N |
Date: |
Fri, 4 Jan 2013 16:39:26 -0800 |
Fixes the libfdt enabled build for hosts that have <machine/bswap.h>.
The code at the beginning of qemu/bswap.h is attempting to standardize
on bswapN. In the case of CONFIG_MACHINE_BSWAP_H, this is all we get.
In the case of CONFIG_BYTESWAP_H, we get bswap_N from the system header
and then wrap these with inline functions to get bswapN.
Signed-off-by: Richard Henderson <address@hidden>
---
include/libfdt_env.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/libfdt_env.h b/include/libfdt_env.h
index 7938d73..3667d4c 100644
--- a/include/libfdt_env.h
+++ b/include/libfdt_env.h
@@ -22,15 +22,15 @@
#include "qemu/bswap.h"
#ifdef HOST_WORDS_BIGENDIAN
-#define fdt32_to_cpu(x) (x)
-#define cpu_to_fdt32(x) (x)
-#define fdt64_to_cpu(x) (x)
-#define cpu_to_fdt64(x) (x)
+#define fdt32_to_cpu(x) (x)
+#define cpu_to_fdt32(x) (x)
+#define fdt64_to_cpu(x) (x)
+#define cpu_to_fdt64(x) (x)
#else
-#define fdt32_to_cpu(x) (bswap_32((x)))
-#define cpu_to_fdt32(x) (bswap_32((x)))
-#define fdt64_to_cpu(x) (bswap_64((x)))
-#define cpu_to_fdt64(x) (bswap_64((x)))
+#define fdt32_to_cpu(x) bswap32(x)
+#define cpu_to_fdt32(x) bswap32(x)
+#define fdt64_to_cpu(x) bswap64(x)
+#define cpu_to_fdt64(x) bswap64(x)
#endif
#endif /* _LIBFDT_ENV_H */
--
1.7.11.7
- [Qemu-devel] [PATCH v2 0/8] linux-user fixes, Richard Henderson, 2013/01/04
- [Qemu-devel] [PATCH 1/8] fdt: Use bswapN instead of bswap_N,
Richard Henderson <=
- [Qemu-devel] [PATCH 4/8] bswap: Rewrite all ld<type>_<endian>_p functions, Richard Henderson, 2013/01/04
- [Qemu-devel] [PATCH 2/8] bswap: Tidy base definitions of bswapN, Richard Henderson, 2013/01/04
- [Qemu-devel] [PATCH 5/8] bswap: Rewrite cpu_to_<endian><type>u with {ld, st}<type>_<endian>_p, Richard Henderson, 2013/01/04
- [Qemu-devel] [PATCH 3/8] bswap: Add host endian unaligned access functions, Richard Henderson, 2013/01/04
- [Qemu-devel] [PATCH 8/8] user: Consider symbolic links as possible directories, Richard Henderson, 2013/01/04
- [Qemu-devel] [PATCH 6/8] linux-user: Rewrite __get_user/__put_user with __builtin_choose_expr, Richard Henderson, 2013/01/04
- [Qemu-devel] [PATCH 7/8] alpha-linux-user: Fix sigaction, Richard Henderson, 2013/01/04
- Re: [Qemu-devel] [PATCH v2 0/8] linux-user fixes, Blue Swirl, 2013/01/12