input: fix typos and repeated words in comments
Subsystems (3)
cover input: fix typos and repeated words in comments
This corrects 2 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 (2):
input: fix typos in comments
input: fix repeated words in comments
drivers/input/keyboard/imx_keypad.c | 2 +- drivers/input/keyboard/pxa27x_keypad.c | 2 +- drivers/input/mouse/cyapa.c | 2 +- drivers/input/mouse/elantech.h | 2 +- drivers/input/rmi4/rmi_f54.c | 2 +- drivers/input/serio/q40kbd.c | 2 +- drivers/input/touchscreen/exc3000.c | 2 +- drivers/input/touchscreen/usbtouchscreen.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-)
Signature · 1 line
2.48.1
PATCH 1/2 input: 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.
--- drivers/input/keyboard/imx_keypad.c | 2 +- drivers/input/keyboard/pxa27x_keypad.c | 2 +- drivers/input/mouse/elantech.h | 2 +- drivers/input/rmi4/rmi_f54.c | 2 +- drivers/input/touchscreen/exc3000.c | 2 +- drivers/input/touchscreen/usbtouchscreen.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
drivers/input/keyboard/imx_keypad.c +1 -1
@@ -396,7 +396,7 @@ static int imx_keypad_open(struct input_dev *dev)imx_keypad_config (keypad); -/* Sanity control, not all the rows must be actived now. */ +/* Sanity control, not all the rows must be activated now. */ if ((readw (keypad->mmio_base +KPDR ) & keypad->rows_en_mask) ==0 ) {dev_err (&dev->dev,"too many keys pressed, control pins initialisation\n" );
drivers/input/keyboard/pxa27x_keypad.c +1 -1
@@ -522,7 +522,7 @@ static void pxa27x_keypad_config(struct pxa27x_keypad *keypad) direct_key_num = keypad->direct_key_num;/* -* Direct keys usage may not start from KP_DKIN0, check the platfrom +* Direct keys usage may not start from KP_DKIN0, check the platform * mask data to config the specific. */ if (!keypad->direct_key_mask)
drivers/input/mouse/elantech.h +1 -1
@@ -57,7 +57,7 @@/* * One hard to find application note states that X axis range is 0 to 576 -* and Y axis range is 0 to 384 for harware version 1. +* and Y axis range is 0 to 384 for hardware version 1. * Edge fuzz might be necessary because of bezel around the touchpad */ #define ETP_EDGE_FUZZ_V1 32
drivers/input/rmi4/rmi_f54.c +1 -1
@@ -193,7 +193,7 @@ static int rmi_f54_request_report(struct rmi_function *fn, u8 report_type)/* * Small delay after disabling interrupts to avoid race condition -* in firmare. This value is a bit higher than absolutely necessary. +* in firmware. This value is a bit higher than absolutely necessary. * Should be removed once issue is resolved in firmware. */ usleep_range (2000 ,3000 );
drivers/input/touchscreen/exc3000.c +1 -1
@@ -406,7 +406,7 @@ static int exc3000_probe(struct i2c_client *client)* ensures, that the device probe will not fail for temporary issues * on the bus. This is not needed for the sysfs calls (userspace * will receive the error code and can start another query) and -* cannot be done for touch events (but that only means loosing one +* cannot be done for touch events (but that only means losing one * or two touch events anyways). */ for (retry =0 ; retry <3 ; retry++) {
drivers/input/touchscreen/usbtouchscreen.c +1 -1
@@ -51,7 +51,7 @@ static bool hwcalib_xy;module_param (hwcalib_xy, bool,0644 );MODULE_PARM_DESC (hwcalib_xy,"If set hw-calibrated X/Y are used if available" ); -/* device specifc data/functions */ +/* device specific data/functions */ struct usbtouch_usb ;struct usbtouch_device_info {int min_xc, max_xc;
Signature · 1 line
2.48.1
PATCH 2/2 input: fix repeated words in comments
In reply to Hemanth SelamDrop words accidentally written twice, reported by checkpatch.pl as a possible repeated word. Only touches comments, no code changes.
--- drivers/input/mouse/cyapa.c | 2 +- drivers/input/serio/q40kbd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/input/mouse/cyapa.c +1 -1
@@ -1322,7 +1322,7 @@ static int cyapa_probe(struct i2c_client *client)/* * Register the device in the input subsystem when it's operational. -* Otherwise, keep in this driver, so it can be be recovered or updated +* Otherwise, keep in this driver, so it can be recovered or updated * through the sysfs mode and update_fw interfaces by user or apps. */ if (cyapa->operational) {
drivers/input/serio/q40kbd.c +1 -1
@@ -72,7 +72,7 @@ static void q40kbd_stop(void)/* * q40kbd_open() is called when a port is open by the higher layer. -* It allocates the interrupt and enables in in the chip. +* It allocates the interrupt and enables in the chip. */ static int q40kbd_open (struct serio *port)
Signature · 1 line
2.48.1
[email protected]
AI reviewRe: [PATCH 2/2] input: fix repeated words in comments
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
New issues:
- [Low] The patch incorrectly fixes a typo, resulting in a grammatically incomplete sentence.
Pre-existing issues:
- [High] Repeated firmware updates via sysfs leak input_dev structures and devres nodes due to manual unregistration of a devm-managed device without freeing it.
- [High] The serio->lock spinlock is accessed uninitialized if an interrupt fires before serio_register_port() completes.
- [High] A Use-After-Free can occur on q40kbd->port during device removal if a pending interrupt fires before free_irq().
--
commit 45b867db64f6ee078771ef7b8cf723b44cd0fd23
Author: Hemanth Selam <[email protected]>
input: fix repeated words in comments
Drop words accidentally written twice, reported by checkpatch.pl as a possible repeated word. Only touches comments, no code changes.
[ ... ]
drivers/input/serio/q40kbd.c static void q40kbd_stop(void) · line 75
Quoted 10 lines
drivers/input/serio/q40kbd.c +1
-1@@ -72,7 +72,7 @@ static void q40kbd_stop(void)/* * q40kbd_open() is called when a port is open by the higher layer. -* It allocates the interrupt and enables in in the chip. +* It allocates the interrupt and enables in the chip.
[Severity: Low]
Does this typo fix leave the sentence grammatically incomplete? The original text "enables in in the chip" appears to be a typo for "enables it in the chip".
drivers/input/serio/q40kbd.c static void q40kbd_stop(void) · line 78
Quoted 3 lines
drivers/input/serio/q40kbd.c +0
-0*/ static int q40kbd_open (struct serio *port)
[Severity: High]
This is a pre-existing issue, but does cyapa_update_fw_store() leak memory and devres tracking nodes on every firmware update?
drivers/input/mouse/cyapa.c:cyapa_update_fw_store() {
...
input_unregister_device(cyapa->input);
cyapa->input = NULL;
...
}Manual unregistration of a devm-allocated device without freeing it leaves the devres tracking node and memory orphaned. When cyapa_reinitialize() is called, it allocates a new input device, creating a new devres node.
[Severity: High]
This is a pre-existing issue, but can the serio port spinlock be accessed uninitialized if an interrupt fires before q40kbd_probe() completes?
drivers/input/serio/q40kbd.c:q40kbd_probe() {
...
error = request_irq(Q40_IRQ_KEYBOARD, q40kbd_interrupt, 0,
DRV_NAME, q40kbd);
...
serio_register_port(q40kbd->port);
...
}If an interrupt fires when request_irq() is called, q40kbd_interrupt() will call serio_interrupt(), which acquires serio->lock. However, the spinlock isn't initialized until serio_register_port() is called.
[Severity: High]
This is a pre-existing issue, but is there a use-after-free race during device removal if a pending interrupt fires before the IRQ is freed?
drivers/input/serio/q40kbd.c:q40kbd_remove() {
...
serio_unregister_port(q40kbd->port);
free_irq(Q40_IRQ_KEYBOARD, q40kbd);
...
}While serio_unregister_port() calls the close method to mask the hardware interrupt, it does not wait for already-running handlers. If q40kbd_interrupt() is executing on another CPU, it can dereference q40kbd->port after it has been freed by serio_unregister_port().
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Re: [PATCH 2/2] input: fix repeated words in comments
In reply to Hemanth SelamPlease drop this patch. The sashiko bot flagged it and it is right.
drivers/input/serio/q40kbd.c
"It allocates the interrupt and enables in in the chip."
My patch deleted one "in" and left "enables in the chip", which has no object. Reading the function, what it enables is the keyboard interrupt, so the comment should say "enables it in the chip" - a different fix from the one I sent.
I will send that as a separate patch if you would like it; otherwise please just drop this one.