Skip to contentSkip to conversation

power: fix typos in comments

PATCH Applied Hemanth Selam 3 participants 5 messages Sep 7 – Sep 9

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

cover power: fix typos in comments

This corrects 2 misspellings 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 (2):
power: supply: fix typos in comments
power: reset: add missing space in error message

 drivers/power/reset/keystone-reset.c    | 2 +-
 drivers/power/supply/bq25890_charger.c  | 2 +-
 drivers/power/supply/charger-manager.c  | 2 +-
 drivers/power/supply/da9030_battery.c   | 2 +-
 drivers/power/supply/max17042_battery.c | 2 +-
 drivers/power/supply/sbs-charger.c      | 4 ++--
 drivers/power/supply/smb347-charger.c   | 4 ++--
 7 files changed, 9 insertions(+), 9 deletions(-)
Signature · 1 line
2.48.1
#1 lore raw

PATCH 1/2 power: supply: 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
---
 drivers/power/supply/bq25890_charger.c  | 2 +-
 drivers/power/supply/charger-manager.c  | 2 +-
 drivers/power/supply/da9030_battery.c   | 2 +-
 drivers/power/supply/max17042_battery.c | 2 +-
 drivers/power/supply/sbs-charger.c      | 4 ++--
 drivers/power/supply/smb347-charger.c   | 4 ++--
 6 files changed, 8 insertions(+), 8 deletions(-)
drivers/power/supply/bq25890_charger.c +1 -1
index 741a45cc5f35..f7510ada6b73 100644
@@ -1590,7 +1590,7 @@ static int bq25890_suspend(struct device *dev)
 	struct bq25890_device *bq = dev_get_drvdata(dev);
 
 	/*
-	 * If charger is removed, while in suspend, make sure ADC is diabled
+	 * If charger is removed, while in suspend, make sure ADC is disabled
 	 * since it consumes slightly more power.
 	 */
 	return bq25890_field_write(bq, F_CONV_RATE, 0);
drivers/power/supply/charger-manager.c +1 -1
index fd4cd9cd2ce2..8e8c5109401a 100644
@@ -904,7 +904,7 @@ static bool cm_setup_timer(void)
 }
 
 /**
- * charger_extcon_work - enable/diable charger according to the state
+ * charger_extcon_work - enable/disable charger according to the state
  *			of charger cable
  *
  * @work: work_struct of the function charger_extcon_work.
drivers/power/supply/da9030_battery.c +1 -1
index d25279c26030..8c4daec0a6b6 100644
@@ -263,7 +263,7 @@ static void da9030_charger_check_state(struct da9030_charger *charger)
 		} else if (charger->adc.vbat_res >
 			   charger->thresholds.vbat_low) {
 			/* we are charging and passed LOW_THRESH,
-			   so upate DA9030 VBAT threshold
+			   so update DA9030 VBAT threshold
 			 */
 			da903x_write(charger->master, DA9030_VBATMON,
 				     charger->thresholds.vbat_low);
drivers/power/supply/max17042_battery.c +1 -1
index cbf3ac9c3e14..a53970af56cb 100644
@@ -1080,7 +1080,7 @@ static int max17042_init_chip(struct max17042_chip *chip)
 		/* update capacity params */
 		max17042_update_capacity_regs(chip);
 
-		/* delay must be atleast 350mS to allow VFSOC
+		/* delay must be at least 350mS to allow VFSOC
 		 * to be calculated from the new configuration
 		 */
 		msleep(350);
drivers/power/supply/sbs-charger.c +2 -2
index e7b4e10dcfd5..bc40bbb429e6 100644
@@ -2,10 +2,10 @@
 /*
  * Copyright (c) 2016, Prodys S.L.
  *
- * This adds support for sbs-charger compilant chips as defined here:
+ * This adds support for sbs-charger compliant chips as defined here:
  * http://sbs-forum.org/specs/sbc110.pdf
  *
- * Implemetation based on sbs-battery.c
+ * Implementation based on sbs-battery.c
  */
 
 #include <linux/init.h>
drivers/power/supply/smb347-charger.c +2 -2
index c1b67dac8ef6..72dfa15b3d80 100644
@@ -149,7 +149,7 @@
  * @pre_charge_current: current (in uA) to use in pre-charging phase
  * @termination_current: current (in uA) used to determine when the
  *			 charging cycle terminates
- * @pre_to_fast_voltage: voltage (in uV) treshold used for transitioning to
+ * @pre_to_fast_voltage: voltage (in uV) threshold used for transitioning to
  *			 pre-charge to fast charge mode
  * @mains_current_limit: maximum input current drawn from AC/DC input (in uA)
  * @usb_hc_current_limit: maximum input high current (in uA) drawn from USB
@@ -302,7 +302,7 @@ static int current_to_hw(const unsigned int *tbl, size_t size, unsigned int val)
  *
  * Function checks whether any power source is connected to the charger and
  * updates internal state accordingly. If there is a change to previous state
- * function returns %1, otherwise %0 and negative errno in case of errror.
+ * function returns %1, otherwise %0 and negative errno in case of error.
  */
 static int smb347_update_ps_status(struct smb347_charger *smb)
 {
Signature · 1 line
2.48.1
#2 lore raw

PATCH 2/2 power: reset: add missing space in error message

In reply to Hemanth Selam

The two string literals are concatenated, so the message prints "has to contain atleast one entry". Add the missing space.

checkpatch.pl misses this one: neither literal is misspelled on its own, the fault only appears once they are joined.

Only the message text changes, no code changes.

Assisted-by Cursor:claude-opus-5
---
 drivers/power/reset/keystone-reset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/reset/keystone-reset.c +1 -1
index 3c44cd6cee0a..dbf2e4274dc6 100644
@@ -112,7 +112,7 @@ static int rsctrl_probe(struct platform_device *pdev)
 	for (i = 0; i < WDT_MUX_NUMBER; i++) {
 		ret = of_property_read_u32_index(np, "ti,wdt-list", i, &val);
 		if (ret == -EOVERFLOW && !i) {
-			dev_err(dev, "ti,wdt-list property has to contain at"
+			dev_err(dev, "ti,wdt-list property has to contain at "
 				"least one entry\n");
 			return -EINVAL;
 		} else if (ret) {
Signature · 1 line
2.48.1
#3 lore raw

Re: [PATCH 2/2] power: reset: add missing space in error message

Quoted 19 lines · Hemanth Selam

The two string literals are concatenated, so the message prints "has to contain atleast one entry". Add the missing space.

checkpatch.pl misses this one: neither literal is misspelled on its own, the fault only appears once they are joined.

Only the message text changes, no code changes.

Assisted-by Cursor:claude-opus-5
---
 drivers/power/reset/keystone-reset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/reset/keystone-reset.c +0 -0
index 3c44cd6cee0a..dbf2e4274dc6 100644

drivers/power/reset/keystone-reset.c static int rsctrl_probe(struct platform_device *pdev) · line 116

Quoted 6 lines
drivers/power/reset/keystone-reset.c +1 -1
@@ -112,7 +112,7 @@ static int rsctrl_probe(struct platform_device *pdev)
 	for (i = 0; i < WDT_MUX_NUMBER; i++) {
 		ret = of_property_read_u32_index(np, "ti,wdt-list", i, &val);
 		if (ret == -EOVERFLOW && !i) {
-			dev_err(dev, "ti,wdt-list property has to contain at"
+			dev_err(dev, "ti,wdt-list property has to contain at "
 				"least one entry\n");

Instead, string should not be wrapped.

You need to improve your interactions/prompts with your AI slop tool, so it will follow Linux kernel coding style.

Best regards,
Krzysztof

#4 lore raw

Re: (subset) [PATCH 0/2] power: fix typos in comments

In reply to Hemanth Selam
Quoted 9 lines · Hemanth Selam

This corrects 2 misspellings 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, thanks!

[1/2] power: supply: fix typos in comments

      commit: ee0b9288afbe0af27f7257d17bc0c1d61ca52007

Best regards,

Signature · 1 line
Sebastian Reichel <[email protected]>