treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / mips / include / asm / bitrev.h
blob8a2538e08a4e9259a56a4209a892d783d71d5f08
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __MIPS_ASM_BITREV_H__
3 #define __MIPS_ASM_BITREV_H__
5 #include <linux/swab.h>
7 static __always_inline __attribute_const__ u32 __arch_bitrev32(u32 x)
9 u32 ret;
11 asm("bitswap %0, %1" : "=r"(ret) : "r"(__swab32(x)));
12 return ret;
15 static __always_inline __attribute_const__ u16 __arch_bitrev16(u16 x)
17 u16 ret;
19 asm("bitswap %0, %1" : "=r"(ret) : "r"(__swab16(x)));
20 return ret;
23 static __always_inline __attribute_const__ u8 __arch_bitrev8(u8 x)
25 u8 ret;
27 asm("bitswap %0, %1" : "=r"(ret) : "r"(x));
28 return ret;
31 #endif /* __MIPS_ASM_BITREV_H__ */