Skip to contentSkip to conversation

soc: fix typos in comments

PATCH Superseded Hemanth Selam 2 participants 3 messages Sep 7 – Oct 26 Tegra architecture support

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: fix typos in comments

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
---
 include/soc/tegra/bpmp-abi.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/soc/tegra/bpmp-abi.h +2 -2
index 5c64b3e02211..4766ca988b7d 100644
@@ -76,7 +76,7 @@
  * @ingroup MRQ_Format
  *
  * Request an answer from the peer.
- * This should be set in mrq_request::flags for all requests targetted
+ * This should be set in mrq_request::flags for all requests targeted
  * at BPMP. For requests originating in BPMP, this flag is optional except
  * for messages targeting MCE, for which the field must be set.
  * When this flag is not set, the remote peer must not send a response
@@ -2727,7 +2727,7 @@ struct mrq_abi_ratchet_request {
  * @brief Response to #MRQ_ABI_RATCHET
  *
  * #ratchet shall be #BPMP_ABI_RATCHET_VALUE from the ABI header
- * against which BPMP firwmare was compiled.
+ * against which BPMP firmware was compiled.
  *
  * If #ratchet is less than the requester's #BPMP_ABI_RATCHET_VALUE,
  * the requster must either interoperate with BPMP according to an ABI
Signature · 1 line
2.48.1
maintainer
#1 lore raw
Quoted 9 lines · 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
---
 include/soc/tegra/bpmp-abi.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks. Though honestly this seems like a waste of LLM tokens. Spell checking is one of those problems that has been solved for a long time, though obviously we don't consistently run it on the source code, otherwise we wouldn't still have these typos. Maybe a better use of LLM tokens would be to have it write a script that can be merged and that will automatically run a spellcheck on the tree.

For some reason I can't seem to get checkpatch.pl report these spelling mistakes, so maybe that's part of the reason why these are not flagged before they get merged?

Thierry

#2 lore raw
Quoted 3 lines · Thierry Reding

For some reason I can't seem to get checkpatch.pl report these spelling mistakes, so maybe that's part of the reason why these are not flagged before they get merged?

That is exactly it, and there are three separate reasons it stays quiet.

The spelling check only looks at the commit log and at lines beginning with '+':

	if (defined($misspellings) &&
	    ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) {

so on a normal patch it reads what you are adding and nothing else. A typo already in the file is never examined, even when it is sitting in the context lines of the very same hunk. Nothing that is already in the tree can be found this way, which is why none of these were caught when the code went in.

Scanning a whole file needs -f, but in file mode the finding is demoted from WARN to CHK, and CHK only prints under --strict. So:

	$ scripts/checkpatch.pl -f drivers/mtd/ubi/wl.c
	(says nothing about it)
	$ scripts/checkpatch.pl -f --strict drivers/mtd/ubi/wl.c
	CHECK: 'occured' may be misspelled - perhaps 'occurred'?

That is probably the run you were missing.

The third reason is the word list. scripts/spelling.txt has to contain the misspelling or it does not exist as far as checkpatch is concerned, and it is much smaller than people expect. "inclue" in drivers/nfc/fdp/i2c.c:270 is a plain typo that no invocation of checkpatch will report, because the word is not in the file. --codespell swaps in codespell's dictionary, which is where most of these actually come from.

Quoted 3 lines

Maybe a better use of LLM tokens would be to have it write a script that can be merged and that will automatically run a spellcheck on the tree.

Agreed, and codespell is the right engine for it rather than spelling.txt. The awkward part is the false positives: codespell on the kernel produces a lot of them, mostly identifiers, hex, and abbreviations in comments, so something mergeable needs a tuned ignore list more than it needs a wrapper. I will see how far I get and send it separately rather than hold up anything here.

Thanks for picking the patch up.

Hemanth