Skip to contentSkip to conversation

Input: alps - switch to use scnprintf() to suppress truncation warning

PATCH In review Andy Shevchenko 2 participants 2 messages Jun 30, 2025

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

PATCH 1/1 Input: alps - switch to use scnprintf() to suppress truncation warning

The commit 76c968e75715 ("Input: alps - switch to use scnprintf() to suppress truncation warning") converted one place in the driver while the other left untouched. Convert the other place as well.

---

Dmitry, thanks for fixing those problems! This one can be folded into mentioned commit if you are still can / want to rebase.

 drivers/input/mouse/alps.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/input/mouse/alps.c +2 -2
index a1ebc30c11a9..d0cb9fb94821 100644
@@ -3103,8 +3103,8 @@ int alps_init(struct psmouse *psmouse)
 			goto init_fail;
 		}
 
-		snprintf(priv->phys2, sizeof(priv->phys2), "%s/input1",
-			 psmouse->ps2dev.serio->phys);
+		scnprintf(priv->phys2, sizeof(priv->phys2), "%s/input1",
+			  psmouse->ps2dev.serio->phys);
 		dev2->phys = priv->phys2;
 
 		/*
Signature · 1 line
2.47.2
maintainer
#1 lore raw
Quoted 9 lines · Andy Shevchenko

The commit 76c968e75715 ("Input: alps - switch to use scnprintf() to suppress truncation warning") converted one place in the driver while the other left untouched. Convert the other place as well.

---

Dmitry, thanks for fixing those problems! This one can be folded into mentioned commit if you are still can / want to rebase.

Thank you Andy, I strongly prefer not to rebase for-linus branch so I applied this as a separate patch.

Thanks.

Signature · 1 line
Dmitry