drop unused byteswap functions

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-12-31 11:10:02 +01:00
parent d4b125e2b1
commit a33a63e017
2 changed files with 2 additions and 15 deletions

View File

@@ -158,9 +158,9 @@ XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
# Checks for headers/macros for byte swapping
# Known variants:
# <byteswap.h> bswap_16, bswap_32, bswap_64 (glibc)
# <byteswap.h> bswap_16, bswap_32 (glibc)
# <sys/endian.h> __swap16, __swap32, __swap64 (OpenBSD)
# <sys/endian.h> bswap16, bswap32, bswap64 (other BSD's)
# <sys/endian.h> bswap16, bswap32 (other BSD's)
# and a fallback to local macros if none of the above are found
# if <byteswap.h> is found, assume it's the correct version
@@ -211,8 +211,6 @@ b = bswap16(a);
[Define to 16-bit byteswap macro])
AC_DEFINE_UNQUOTED([radeon_bswap_32], ${BSWAP}32,
[Define to 32-bit byteswap macro])
AC_DEFINE_UNQUOTED([radeon_bswap_64], ${BSWAP}64,
[Define to 64-bit byteswap macro])
fi
fi

View File

@@ -108,7 +108,6 @@ struct _SyncFence;
#include <byteswap.h>
#define radeon_bswap_16 bswap_16
#define radeon_bswap_32 bswap_32
#define radeon_bswap_64 bswap_64
#elif defined(USE_SYS_ENDIAN_H)
#include <sys/endian.h>
#else
@@ -119,22 +118,12 @@ struct _SyncFence;
(((uint32_t)radeon_bswap_16((uint16_t)((value) & 0xffff)) << 16) | \
(uint32_t)radeon_bswap_16((uint16_t)((value) >> 16)))
#define radeon_bswap_64(value) \
(((uint64_t)radeon_bswap_32((uint32_t)((value) & 0xffffffff)) \
<< 32) | \
(uint64_t)radeon_bswap_32((uint32_t)((value) >> 32)))
#endif
#if X_BYTE_ORDER == X_BIG_ENDIAN
#define le32_to_cpu(x) radeon_bswap_32(x)
#define le16_to_cpu(x) radeon_bswap_16(x)
#define cpu_to_le32(x) radeon_bswap_32(x)
#define cpu_to_le16(x) radeon_bswap_16(x)
#else
#define le32_to_cpu(x) (x)
#define le16_to_cpu(x) (x)
#define cpu_to_le32(x) (x)
#define cpu_to_le16(x) (x)
#endif
/* Provide substitutes for gcc's __FUNCTION__ on other compilers */