Skip to contentSkip to conversation

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

PATCH New Andy Shevchenko 1 participant 1 message Jan 13

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

PATCH 1/1 Input: fujitsu_ts - 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/fujitsu_ts.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/input/touchscreen/fujitsu_ts.c +1 -2
index 1a3e14ea2e08..cef2e93c17bc 100644
@@ -108,8 +108,7 @@ static int fujitsu_connect(struct serio *serio, struct serio_driver *drv)
 
 	fujitsu->serio = serio;
 	fujitsu->dev = input_dev;
-	snprintf(fujitsu->phys, sizeof(fujitsu->phys),
-		 "%s/input0", serio->phys);
+	scnprintf(fujitsu->phys, sizeof(fujitsu->phys), "%s/input0", serio->phys);
 
 	input_dev->name = "Fujitsu Serial Touchscreen";
 	input_dev->phys = fujitsu->phys;
Signature · 1 line
2.50.1