arm64: fix typos and repeated words in comments
Subsystems (3)
cover arm64: fix typos and repeated words in comments
This corrects 4 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 (4):
Documentation/arch: fix typo "initalised" in comment
arm64: fix typos in comments
selftests: arm64: fix typo "hander" in comment
arm64: include: fix repeated word 'to' in comment
Documentation/arch/arm64/booting.rst | 2 +- arch/arm64/include/asm/pgtable-prot.h | 2 +- arch/arm64/include/asm/stage2_pgtable.h | 2 +- arch/arm64/include/uapi/asm/ptrace.h | 4 ++-- arch/arm64/kernel/cpufeature.c | 4 ++-- .../arm64/signal/testcases/fake_sigreturn_sve_change_vl.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-)
Signature · 1 line
2.48.1
PATCH 1/4 Documentation/arch: fix typo "initalised" in comment
Correct "initalised" to "initialized", reported by scripts/checkpatch.pl using the misspelling list in scripts/spelling.txt. Only touches comments, no code changes.
--- Documentation/arch/arm64/booting.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/arch/arm64/booting.rst +1 -1
@@ -588,7 +588,7 @@ following manner: - CPUs with a "spin-table" enable-method must have a 'cpu-release-addr' property in their cpu node. This property identifies a - naturally-aligned 64-bit zero-initalised memory location. + naturally-aligned 64-bit zero-initialized memory location. These CPUs should spin outside of the kernel in a reserved area of memory (communicated to the kernel by a /memreserve/ region in the
Signature · 1 line
2.48.1
Randy Dunlap
reviewerRe: [PATCH 1/4] Documentation/arch: fix typo "initalised" in comment
Quoted 6 lines · Hemanth Selam
Correct "initalised" to "initialized", reported by
scripts/checkpatch.plusing the misspelling list inscripts/spelling.txt. Only touches comments, no code changes.Assisted-by Cursor:claude-opus-5Signed-off-by Hemanth Selam <[email protected]>
Yes, it's misspelled here. But please be aware of this (from Documentation/doc-guide/contributing.rst):
Please note that some things are *not* typos and should not be "fixed":
- Both American and British English spellings are allowed within the kernel documentation. There is no need to fix one by replacing it with the other.
- The question of whether a period should be followed by one or two spaces is not to be debated in the context of kernel documentation. Other areas of rational disagreement, such as the "Oxford comma", are also off-topic here.
Quoted 9 lines
--- Documentation/arch/arm64/booting.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Documentation/arch/arm64/booting.rst +0
-0
Documentation/arch/arm64/booting.rst following manner: · line 594
Quoted 8 lines
Documentation/arch/arm64/booting.rst +1
-1@@ -588,7 +588,7 @@ following manner: - CPUs with a "spin-table" enable-method must have a 'cpu-release-addr' property in their cpu node. This property identifies a - naturally-aligned 64-bit zero-initalised memory location. + naturally-aligned 64-bit zero-initialized memory location. These CPUs should spin outside of the kernel in a reserved area of memory (communicated to the kernel by a /memreserve/ region in the
thanks.
Signature · 1 line
~Randy
Re: [PATCH 1/4] Documentation/arch: fix typo "initalised" in comment
Thanks for the pointer, and you are right to raise it - I checked and this patch does fall foul of that rule.
The word in Documentation/arch/arm64/booting.rst is "zero-initalised", and I changed it to "zero-initialized", which quietly moves the file from British to American spelling. The minimal fix is "zero-initialised".
I followed checkpatch here, and checkpatch is following the dictionary:
scripts/spelling.txt:875:initalised||initialized scripts/spelling.txt:874:initalise||initialize
Those are the only two entries in the file that map a British form to an American one, and by the rule you quoted they should read
initalise||initialise
initalised||initialised
so that the misspelling is corrected without changing the variety of English in the file. arch/arm64 currently has 58 uses of "initialised" against 132 of "initialized", so both spellings are clearly in use there.
I will send a v2 that uses "zero-initialised". Would a separate patch fixing those two spelling.txt entries be welcome, or is that better left alone?
Randy Dunlap
reviewerRe: [PATCH 1/4] Documentation/arch: fix typo "initalised" in comment
Hi,
Quoted 18 lines · Hemanth Selam
Thanks for the pointer, and you are right to raise it - I checked and this patch does fall foul of that rule.
The word in
Documentation/arch/arm64/booting.rstis "zero-initalised", and I changed it to "zero-initialized", which quietly moves the file from British to American spelling. The minimal fix is "zero-initialised".I followed checkpatch here, and checkpatch is following the dictionary:
scripts/spelling.txt:875:initalised||initialized scripts/spelling.txt:874:initalise||initialize
Those are the only two entries in the file that map a British form to an American one, and by the rule you quoted they should read
initalise||initialise
initalised||initialised
Quoted 7 lines
so that the misspelling is corrected without changing the variety of English in the file.
arch/arm64currently has 58 uses of "initialised" against 132 of "initialized", so both spellings are clearly in use there.I will send a v2 that uses "zero-initialised". Would a separate patch fixing those two spelling.txt entries be welcome, or is that better left alone?
IMO the 2 entries in spelling.txt should be corrected.
thanks.
Signature · 1 line
~Randy
PATCH 2/4 arm64: fix typos in comments
In reply to Hemanth SelamFix typos in comments, reported by scripts/checkpatch.pl using the misspelling list in scripts/spelling.txt. Only touches comments, no code changes.
--- arch/arm64/include/asm/stage2_pgtable.h | 2 +- arch/arm64/include/uapi/asm/ptrace.h | 4 ++-- arch/arm64/kernel/cpufeature.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)
arch/arm64/include/asm/stage2_pgtable.h +1 -1
@@ -17,7 +17,7 @@* * This implies, the total number of page table levels required for * IPA_SHIFT at stage2 expected by the hardware can be calculated using -* the same logic used for the (non-collapsable) stage1 page tables but for +* the same logic used for the (non-collapsible) stage1 page tables but for * (IPA_SHIFT - 4). */ #define stage2_pgtable_levels (ipa) ARM64_HW_PGTABLE_LEVELS((ipa) - 4)
arch/arm64/include/uapi/asm/ptrace.h +2 -2
@@ -113,7 +113,7 @@ struct user_hwdebug_state {struct user_sve_header {__u32 size;/* total meaningful regset content in bytes */ -__u32 max_size;/* maxmium possible size for this thread */ +__u32 max_size;/* maximum possible size for this thread */ __u16 vl;/* current vector length */ __u16 max_vl;/* maximum possible vector length */ __u16 flags;
@@ -272,7 +272,7 @@ struct user_pac_generic_keys {struct user_za_header {__u32 size;/* total meaningful regset content in bytes */ -__u32 max_size;/* maxmium possible size for this thread */ +__u32 max_size;/* maximum possible size for this thread */ __u16 vl;/* current vector length */ __u16 max_vl;/* maximum possible vector length */ __u16 flags;
arch/arm64/kernel/cpufeature.c +2 -2
@@ -888,7 +888,7 @@ static int search_cmp_ftr_reg(const void *id, const void *regp)* entry. * * returns - Upon success, matching ftr_reg entry for id. -* - NULL on failure. It is upto the caller to decide +* - NULL on failure. It is up to the caller to decide * the impact of a failure. */ static struct arm64_ftr_reg *get_arm64_ftr_reg_nowarn (u32 sys_id)
@@ -3682,7 +3682,7 @@ static void verify_local_cpu_caps(u16 scope_mask)/* * We have to issue cpu_enable() irrespective of * whether the CPU has it or not, as it is enabeld -* system wide. It is upto the call back to take +* system wide. It is up to the call back to take * appropriate action on this CPU. */ if (caps->cpu_enable)
Signature · 1 line
2.48.1
PATCH 3/4 selftests: arm64: fix typo "hander" in comment
In reply to Hemanth SelamCorrect "hander" to "handler", reported by scripts/checkpatch.pl using the misspelling list in scripts/spelling.txt. Only touches comments, no code changes.
--- .../arm64/signal/testcases/fake_sigreturn_sve_change_vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/arm64/signal/testcases/fake_sigreturn_sve_change_vl.c +1 -1
@@ -2,7 +2,7 @@/* * Copyright (C) 2021 ARM Limited * -* Attempt to change the SVE vector length in a signal hander, this is not +* Attempt to change the SVE vector length in a signal handler, this is not * supported and is expected to segfault. */
Signature · 1 line
2.48.1
PATCH 4/4 arm64: include: fix repeated word 'to' in comment
In reply to Hemanth SelamDrop the second 'to', reported by checkpatch.pl as a possible repeated word. Only touches a comment, no code changes.
--- arch/arm64/include/asm/pgtable-prot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/include/asm/pgtable-prot.h +1 -1
@@ -139,7 +139,7 @@ static inline bool __pure lpa2_is_enabled(void)/* * Page types used via Permission Indirection Extension (PIE). PIE uses -* the USER, DBM, PXN and UXN bits to to generate an index which is used +* the USER, DBM, PXN and UXN bits to generate an index which is used * to look up the actual permission in PIR_ELx and PIRE0_EL1. We define * combinations we use on non-PIE systems with the same encoding, for * convenience these are listed here as comments as are the unallocated
Signature · 1 line
2.48.1
Re: (subset) [PATCH 0/4] arm64: fix typos and repeated words in comments
In reply to Hemanth SelamQuoted 10 lines · Hemanth Selam
This corrects 4 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.
[...]
Applied to arm64 (for-next/misc), thanks!
[2/4] arm64: fix typos in comments
https://git.kernel.org/arm64/c/dc8afa34b5de [3/4] selftests: arm64: fix typo "hander" in comment https://git.kernel.org/arm64/c/1ad42ed8a666 [4/4] arm64: include: fix repeated word 'to' in comment https://git.kernel.org/arm64/c/629a472598a0