summaryrefslogtreecommitdiff
path: root/crc/crc32c-arm64.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2017-06-22 14:03:14 -0600
committerJens Axboe <axboe@kernel.dk>2017-06-22 14:03:14 -0600
commit97211af31edb8bcb2d85fa6f8873ded829c2e368 (patch)
tree58b32b8a47cffc8f8e4cd6a56b6357d10558565c /crc/crc32c-arm64.c
parent22bcb265833f263facd58bcef3d8a159c554460e (diff)
downloadfio-97211af31edb8bcb2d85fa6f8873ded829c2e368.tar.gz
fio-97211af31edb8bcb2d85fa6f8873ded829c2e368.tar.bz2
crc32c: use bool
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'crc/crc32c-arm64.c')
-rw-r--r--crc/crc32c-arm64.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/crc/crc32c-arm64.c b/crc/crc32c-arm64.c
index c3f42c7c..08177ba6 100644
--- a/crc/crc32c-arm64.c
+++ b/crc/crc32c-arm64.c
@@ -19,7 +19,7 @@
#define HWCAP_CRC32 (1 << 7)
#endif /* HWCAP_CRC32 */
-int crc32c_arm64_available = 0;
+bool crc32c_arm64_available = false;
#ifdef ARCH_HAVE_ARM64_CRC_CRYPTO
@@ -27,7 +27,7 @@ int crc32c_arm64_available = 0;
#include <arm_acle.h>
#include <arm_neon.h>
-static int crc32c_probed;
+static bool crc32c_probed;
/*
* Function to calculate reflected crc with PMULL Instruction
@@ -106,9 +106,8 @@ void crc32c_arm64_probe(void)
if (!crc32c_probed) {
hwcap = getauxval(AT_HWCAP);
- if (hwcap & HWCAP_CRC32)
- crc32c_arm64_available = 1;
- crc32c_probed = 1;
+ crc32c_arm64_available = (hwcap & HWCAP_CRC32) != 0;
+ crc32c_probed = true;
}
}