Commit aa5dafcb authored by Anup Patel's avatar Anup Patel Committed by Anup Patel
Browse files

include: sbi: Fix BSWAPx() macros for big-endian host

The BSWAPx() macros won't do any swapping for big-endian host
because the EXTRACT_BYTE() macro will pickup bytes in reverse
order. Also, the EXTRACT_BYTE() will generate compile error
for constants.

To fix this, we get remove the EXTRACT_BYTE() macro and re-write
BSWAPx() using simple mask and shift operations.

Fixes: 09b34d8c

 ("include: Add support for byteorder/endianness
conversion")
Reported-by: default avatarSamuel Holland <samuel@sholland.org>
Signed-off-by: default avatarAnup Patel <apatel@ventanamicro.com>
parent b224ddb4
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment