Skip to contentSkip to conversation

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

PATCH Applied Andy Shevchenko 2 participants 2 messages Jan 13 – Jan 20

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

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

Switch the driver to use scnprintf() to avoid warnings about potential truncation of "phys" field which we can tolerate.

---
 drivers/input/touchscreen/dynapro.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/touchscreen/dynapro.c +1 -1
index fe626a226b85..00d18823a059 100644
@@ -119,7 +119,7 @@ static int dynapro_connect(struct serio *serio, struct serio_driver *drv)
 
 	pdynapro->serio = serio;
 	pdynapro->dev = input_dev;
-	snprintf(pdynapro->phys, sizeof(pdynapro->phys),
+	scnprintf(pdynapro->phys, sizeof(pdynapro->phys),
 		 "%s/input0", serio->phys);
 
 	input_dev->name = "Dynapro Serial TouchScreen";
Signature · 1 line
2.50.1
maintainer Applied
#1 lore raw
Quoted 4 lines · Andy Shevchenko

Switch the driver to use scnprintf() to avoid warnings about potential truncation of "phys" field which we can tolerate.

Applied this and the rest of your similar patches, thanks!

Signature · 1 line
Dmitry