From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bin Meng Date: Wed, 16 Oct 2019 09:27:23 -0700 Subject: [U-Boot] [PATCH 3/5] tools: zynqmpbif: Use compiler builtin instead of linux-specific __swab32 In-Reply-To: <1571243245-4991-1-git-send-email-bmeng.cn@gmail.com> References: <1571243245-4991-1-git-send-email-bmeng.cn@gmail.com> Message-ID: <1571243245-4991-4-git-send-email-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de __swab32() is a Linux specific macro defined in linux/swab.h. Let's use the compiler equivalent builtin function __builtin_bswap32() for better portability. Signed-off-by: Bin Meng --- tools/zynqmpbif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/zynqmpbif.c b/tools/zynqmpbif.c index 8c47107..82ce0ac 100644 --- a/tools/zynqmpbif.c +++ b/tools/zynqmpbif.c @@ -517,7 +517,7 @@ static int bif_add_bit(struct bif_entry *bf) debug("Bitstream Length: 0x%x\n", bitlen); for (i = 0; i < bitlen; i += sizeof(uint32_t)) { uint32_t *bitbin32 = (uint32_t *)&bitbin[i]; - *bitbin32 = __swab32(*bitbin32); + *bitbin32 = __builtin_bswap32(*bitbin32); } if (!bf->dest_dev) -- 2.7.4