treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / mips / include / asm / cpufeature.h
blobba9e62faf59d22ce10a6599a9f27a9f20fbe20e3
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * CPU feature definitions for module loading, used by
4 * module_cpu_feature_match(), see uapi/asm/hwcap.h for MIPS CPU features.
5 */
7 #ifndef __ASM_CPUFEATURE_H
8 #define __ASM_CPUFEATURE_H
10 #include <uapi/asm/hwcap.h>
11 #include <asm/elf.h>
13 #define MAX_CPU_FEATURES (8 * sizeof(elf_hwcap))
15 #define cpu_feature(x) ilog2(HWCAP_ ## x)
17 static inline bool cpu_have_feature(unsigned int num)
19 return elf_hwcap & (1UL << num);
22 #endif /* __ASM_CPUFEATURE_H */