Skip to contentSkip to conversation

arm64: fix typos and repeated words in comments

PATCH In review Hemanth Selam 4 participants 8 messages Sep 4 – Sep 11

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover arm64: fix typos and repeated words in comments

This corrects 3 misspellings and repeated words in comments. Each is a separate patch so that any one of them can be dropped without touching the rest.

Nothing outside comments changes. Every touched C file was checked by dropping its comments, replacing each string literal with a placeholder and collapsing whitespace; what remained was identical before and after, so the compiled code cannot differ.

The mistakes were found with scripts/checkpatch.pl against the list in scripts/spelling.txt. The scanning, the edits and the changelogs were produced with Cursor running the claude-opus-5 model, from a request to find and fix spelling mistakes across the tree, and every correction was then re-checked by the comparison described above. Words that name an identifier were left alone deliberately, even when they read as typos, because correcting the prose would make the comment disagree with the code it describes.

Tested by building x86_64 defconfig at v7.3-rc1-269-gbc35965f6940, which is clean. Nothing else was built, so any patch touching code that x86_64 defconfig does not compile has been read but not compiled.

Hemanth Selam (3):
arm64: kvm: fix typo "synchonized" in comment
selftests: kvm: fix typos in comments
arm64: kvm: fix repeated word 'is' in comment

 arch/arm64/kvm/hyp/entry.S                           | 2 +-
 arch/arm64/kvm/pauth.c                               | 2 +-
 tools/testing/selftests/kvm/arm64/debug-exceptions.c | 2 +-
 tools/testing/selftests/kvm/arm64/hypercalls.c       | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
2.48.1
#1 lore raw

PATCH 1/3 arm64: kvm: fix typo "synchonized" in comment

Correct "synchonized" to "synchronized", reported by scripts/checkpatch.pl using the misspelling list in scripts/spelling.txt. Only touches comments, no code changes.

Assisted-by Cursor:claude-opus-5
---
 arch/arm64/kvm/hyp/entry.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kvm/hyp/entry.S +1 -1
index 308100ed25de..9709905f21b5 100644
@@ -46,7 +46,7 @@ alternative_else_nop_endif
 
 	// Ensure that __guest_enter() always provides a context
 	// synchronization event so that callers don't need ISBs for anything
-	// that would usually be synchonized by the ERET.
+	// that would usually be synchronized by the ERET.
 	isb
 	mov	x0, #ARM_EXCEPTION_IRQ
 	ret
Signature · 1 line
2.48.1
#2 lore raw

PATCH 2/3 selftests: kvm: fix typos in comments

In reply to Hemanth Selam

Fix typos in comments, reported by scripts/checkpatch.pl using the misspelling list in scripts/spelling.txt. Only touches comments, no code changes.

Assisted-by Cursor:claude-opus-5
---
 tools/testing/selftests/kvm/arm64/debug-exceptions.c | 2 +-
 tools/testing/selftests/kvm/arm64/hypercalls.c       | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
tools/testing/selftests/kvm/arm64/debug-exceptions.c +1 -1
index 7dc5f0b4f6ad..9da6dc5bcfe6 100644
@@ -387,7 +387,7 @@ static void guest_code_ss(int test_cnt)
 		 * Enable Single Step execution.  Note!  This _must_ be a bare
 		 * ucall as the ucall() path uses atomic operations to manage
 		 * the ucall structures, and the built-in "atomics" are usually
-		 * implemented via exclusive access instructions.  The exlusive
+		 * implemented via exclusive access instructions.  The exclusive
 		 * monitor is cleared on ERET, and so taking debug exceptions
 		 * during a LDREX=>STREX sequence will prevent forward progress
 		 * and hang the guest/test.
tools/testing/selftests/kvm/arm64/hypercalls.c +2 -2
index 5d96cdf382c4..a24becda9e62 100644
@@ -1,9 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
-/* hypercalls: Check the ARM64's psuedo-firmware bitmap register interface.
+/* hypercalls: Check the ARM64's pseudo-firmware bitmap register interface.
  *
  * The test validates the basic hypercall functionalities that are exposed
- * via the psuedo-firmware bitmap register. This includes the registers'
+ * via the pseudo-firmware bitmap register. This includes the registers'
  * read/write behavior before and after the VM has started, and if the
  * hypercalls are properly masked or unmasked to the guest when disabled or
  * enabled from the KVM userspace, respectively.
Signature · 1 line
2.48.1
#3 lore raw

PATCH 3/3 arm64: kvm: fix repeated word 'is' in comment

In reply to Hemanth Selam

Drop the second 'is', reported by checkpatch.pl as a possible repeated word. Only touches a comment, no code changes.

Assisted-by Cursor:claude-opus-5
---
 arch/arm64/kvm/pauth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kvm/pauth.c +1 -1
index d5eb3ae876be..22ff4b78d0e9 100644
@@ -5,7 +5,7 @@
  *
  * Primitive PAuth emulation for ERETAA/ERETAB.
  *
- * This code assumes that is is run from EL2, and that it is part of
+ * This code assumes that is run from EL2, and that it is part of
  * the emulation of ERETAx for a guest hypervisor. That's a lot of
  * baked-in assumptions and shortcuts.
  *
Signature · 1 line
2.48.1
#4 lore raw

Re: [PATCH 3/3] arm64: kvm: fix repeated word 'is' in comment

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The patch incorrectly fixes a typo by blindly dropping the second 'is', resulting in a…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch incorrectly fixes a typo by blindly dropping the second 'is', resulting in a grammatically incorrect sentence. --

commit f89cf50275289ffe0b1b52223596e8fc7bd4496d
Author: Hemanth Selam <[email protected]>

arm64: kvm: fix repeated word 'is' in comment

This commit modifies a comment in arch/arm64/kvm/pauth.c to resolve a checkpatch.pl warning by dropping the repeated word 'is'.

arch/arm64/kvm/pauth.c line 8

Quoted 10 lines
arch/arm64/kvm/pauth.c +1 -1
index d5eb3ae876be4..22ff4b78d0e96 100644
@@ -5,7 +5,7 @@
  *
  * Primitive PAuth emulation for ERETAA/ERETAB.
  *
- * This code assumes that is is run from EL2, and that it is part of
+ * This code assumes that is run from EL2, and that it is part of

[Severity: Low]
Does dropping the second 'is' leave the sentence grammatically incomplete? It now reads as "This code assumes that is run from EL2", which is missing the subject pronoun "it". Should the original text have been corrected to "that it is run" instead?

Quoted 3 lines
arch/arm64/kvm/pauth.c +0 -0
  * the emulation of ERETAx for a guest hypervisor. That's a lot of
  * baked-in assumptions and shortcuts.
  *
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
reviewer
#5 lore raw

Re: [PATCH 3/3] arm64: kvm: fix repeated word 'is' in comment

In reply to Hemanth Selam

Hi Hemanth,

Quoted 15 lines · Hemanth Selam

Drop the second 'is', reported by checkpatch.pl as a possible repeated word. Only touches a comment, no code changes.

Assisted-by Cursor:claude-opus-5
---
 arch/arm64/kvm/pauth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kvm/pauth.c +0 -0
index d5eb3ae876be..22ff4b78d0e9 100644

arch/arm64/kvm/pauth.c line 8

Quoted 5 lines
arch/arm64/kvm/pauth.c +1 -1
@@ -5,7 +5,7 @@
  *
  * Primitive PAuth emulation for ERETAA/ERETAB.
  *
- * This code assumes that is is run from EL2, and that it is part of
+ * This code assumes that is run from EL2, and that it is part of

The typo here is that the first "is" should have been an "it", rather than being a duplicate.

+ * This code assumes that it is run from EL2, and that it is part of

Cheers,
/fuad

Quoted 6 lines
arch/arm64/kvm/pauth.c +0 -1
  * the emulation of ERETAx for a guest hypervisor. That's a lot of
  * baked-in assumptions and shortcuts.
  *
--

2.48.1

#6 lore raw

Re: [PATCH 3/3] arm64: kvm: fix repeated word 'is' in comment

Quoted 2 lines · Fuad Tabba

The typo here is that the first "is" should have been an "it", rather than being a duplicate.

You are right, and the patch as I sent it makes the sentence worse rather than better. Please drop 3/3; it should not be applied.

I should have read the sentence instead of the checkpatch warning, and Andrew made the same point in this thread. I have stopped treating that warning as a list of things to fix.

The comment still reads "assumes that is is run from EL2". If you would like the correction, the line should be:

* This code assumes that it is run from EL2, and that it is part of

and I will send it as a single patch, or leave it for whoever next touches the file, whichever you prefer.

Thanks for catching it,
Hemanth

#7 lore raw

Re: [PATCH 3/3] arm64: kvm: fix repeated word 'is' in comment

In reply to Hemanth Selam
Quoted 2 lines · Hemanth Selam

Drop the second 'is', reported by checkpatch.pl as a possible repeated word. Only touches a comment, no code changes.

I hope you are really looking at the sentence, understanding the sentence, and then modifying the sentence based on your understanding, not just removing the duplicate to make checkpatch happy.

You really do need to engage brain.

You also should consider that this checkpatch warning has been around a while. Many of the real problems have already been fixed, so there is probably a high false positive rate for this check. So you need to be extra careful, or you are going to make things worse, not better.

"The the in this sentence is the subject."

If you looked back in the archives maybe a month, there was somebody who get flamed for getting this sort of checkpatch fixup badly wrong.

Andrew