Skip to contentSkip to conversation

cpupower: fix typos in comments

PATCH In review Hemanth Selam 2 participants 3 messages Sep 4 – Sep 7 CPU power monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpupower: 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
---
 tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c | 4 ++--
 tools/power/cpupower/utils/idle_monitor/mperf_monitor.c    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c +2 -2
index e8b3841d5c0f..b15371e3e6bd 100644
@@ -72,7 +72,7 @@ void print_n_spaces(int n)
 }
 
 /*s is filled with left and right spaces
- *to make its length atleast n+1
+ *to make its length at least n+1
  */
 int fill_string_with_spaces(char *s, int n)
 {
@@ -263,7 +263,7 @@ static void parse_monitor_param(char *param)
 			 "try -l option\n"), param);
 		exit(EXIT_FAILURE);
 	}
-	/* Override detected/registerd monitors array with requested one */
+	/* Override detected/registered monitors array with requested one */
 	memcpy(monitors, tmp_mons,
 		sizeof(struct cpuidle_monitor *) * MONITORS_MAX);
 	avail_monitors = hits;
tools/power/cpupower/utils/idle_monitor/mperf_monitor.c +1 -1
index 5ae02c3d5b64..62b8cfb02040 100644
@@ -276,7 +276,7 @@ static int init_maxfreq_mode(void)
 	    cpupower_cpu_info.vendor == X86_VENDOR_HYGON) {
 		/* MSR_AMD_HWCR tells us whether TSC runs at P0/mperf
 		 * freq.
-		 * A test whether hwcr is accessable/available would be:
+		 * A test whether hwcr is accessible/available would be:
 		 * (cpupower_cpu_info.family > 0x10 ||
 		 *   cpupower_cpu_info.family == 0x10 &&
 		 *   cpupower_cpu_info.model >= 0x2))
Signature · 1 line
2.48.1
maintainer
#1 lore raw
Quoted 6 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

Why do you need AI assistance to fix typos found by checkpatch.pl? How did Cursor:claude-opus-5 assist you?

Quoted 33 lines
---
  tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c | 4 ++--
  tools/power/cpupower/utils/idle_monitor/mperf_monitor.c    | 2 +-
  2 files changed, 3 insertions(+), 3 deletions(-)
tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c +2 -2
index e8b3841d5c0f..b15371e3e6bd 100644
@@ -72,7 +72,7 @@ void print_n_spaces(int n)
  }
 
  /*s is filled with left and right spaces
- *to make its length atleast n+1
+ *to make its length at least n+1
   */
  int fill_string_with_spaces(char *s, int n)
  {
@@ -263,7 +263,7 @@ static void parse_monitor_param(char *param)
  			 "try -l option\n"), param);
  		exit(EXIT_FAILURE);
  	}
-	/* Override detected/registerd monitors array with requested one */
+	/* Override detected/registered monitors array with requested one */
  	memcpy(monitors, tmp_mons,
  		sizeof(struct cpuidle_monitor *) * MONITORS_MAX);
  	avail_monitors = hits;
tools/power/cpupower/utils/idle_monitor/mperf_monitor.c +0 -0
index 5ae02c3d5b64..62b8cfb02040 100644

tools/power/cpupower/utils/idle_monitor/mperf_monitor.c static int init_maxfreq_mode(void) · line 282

Quoted 8 lines
tools/power/cpupower/utils/idle_monitor/mperf_monitor.c +1 -1
@@ -276,7 +276,7 @@ static int init_maxfreq_mode(void)
  	    cpupower_cpu_info.vendor == X86_VENDOR_HYGON) {
  		/* MSR_AMD_HWCR tells us whether TSC runs at P0/mperf
  		 * freq.
-		 * A test whether hwcr is accessable/available would be:
+		 * A test whether hwcr is accessible/available would be:
  		 * (cpupower_cpu_info.family > 0x10 ||
  		 *   cpupower_cpu_info.family == 0x10 &&
  		 *   cpupower_cpu_info.model >= 0x2))

thanks,
-- Shuah

#2 lore raw

Fair question, and the honest answer is that I did not need it for the typos themselves.

checkpatch and codespell found every word in this series. What the assistant did was the work around that: splitting several hundred one-line fixes into per-subsystem patches, running get_maintainer.pl to decide who each one goes to, and drafting the changelogs. No part of the diff was model-generated - each change is the substitution checkpatch printed.

The Assisted-by: tag names the tool and model because Documentation/process/coding-assistants.rst asks for the tool to be identified, and the prevailing form in the tree is Vendor:model.

I should add that the review this series has had since Friday has turned up cases where the mechanical fix was simply wrong - deleting a word from "kicks in in a timely manner", for instance. I am auditing the rest and withdrawing the bad ones rather than leaving them for maintainers to catch.