linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kselftest/arm64: Fix typo in hwcap check
@ 2022-09-07 11:33 Mark Brown
  2022-09-22 20:01 ` Catalin Marinas
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2022-09-07 11:33 UTC (permalink / raw)
  To: Will Deacon, Shuah Khan; +Cc: linux-arm-kernel, linux-kselftest, Mark Brown

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>
---
 tools/testing/selftests/arm64/abi/hwcap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c
index 322d9b92bbe3..75eb470eb432 100644
--- a/tools/testing/selftests/arm64/abi/hwcap.c
+++ b/tools/testing/selftests/arm64/abi/hwcap.c
@@ -307,7 +307,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)
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kselftest/arm64: Fix typo in hwcap check
  2022-09-07 11:33 [PATCH] kselftest/arm64: Fix typo in hwcap check Mark Brown
@ 2022-09-22 20:01 ` Catalin Marinas
  0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2022-09-22 20:01 UTC (permalink / raw)
  To: Shuah Khan, Mark Brown, Will Deacon; +Cc: linux-kselftest, linux-arm-kernel

On Wed, 7 Sep 2022 12:33:59 +0100, Mark Brown wrote:
> 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.
> 
> [...]

Applied to arm64 (for-next/kselftest), thanks!

[1/1] kselftest/arm64: Fix typo in hwcap check
      https://git.kernel.org/arm64/c/33060a64901e

-- 
Catalin


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-22 20:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-07 11:33 [PATCH] kselftest/arm64: Fix typo in hwcap check Mark Brown
2022-09-22 20:01 ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).