summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-09-07 12:33:59 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2022-09-22 20:52:06 +0100
commit33060a64901e61f09ea6faffe367551df18a54c3 (patch)
tree9b5bf204694fc9e903c383817015a0f90a916e3d /tools
parentef939f30510b43e90f1fba30477b678107faeae7 (diff)
downloadlinux-stable-33060a64901e61f09ea6faffe367551df18a54c3.tar.gz
linux-stable-33060a64901e61f09ea6faffe367551df18a54c3.tar.bz2
linux-stable-33060a64901e61f09ea6faffe367551df18a54c3.zip
kselftest/arm64: Fix typo in hwcap check
We use a local variable hwcap to refer to the element of the hwcaps array which we are currently checking. When checking for the relevant hwcap bit being set in testing we were dereferencing hwcaps rather than hwcap in fetching the AT_HWCAP to use, which is perfectly valid C but means we were always checking the bit was set in the hwcap for whichever feature is first in the array. Remove the stray s. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220907113400.12982-1-broonie@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/arm64/abi/hwcap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c
index d173e41f2123..9f1a7b5c6193 100644
--- a/tools/testing/selftests/arm64/abi/hwcap.c
+++ b/tools/testing/selftests/arm64/abi/hwcap.c
@@ -295,7 +295,7 @@ int main(void)
for (i = 0; i < ARRAY_SIZE(hwcaps); i++) {
hwcap = &hwcaps[i];
- have_hwcap = getauxval(hwcaps->at_hwcap) & hwcap->hwcap_bit;
+ have_hwcap = getauxval(hwcap->at_hwcap) & hwcap->hwcap_bit;
have_cpuinfo = cpuinfo_present(hwcap->cpuinfo);
if (have_hwcap)