]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Input: tsc40 - switch to use scnprintf() to suppress truncation warning
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 20 Jan 2026 20:05:24 +0000 (12:05 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 20 Jan 2026 20:18:02 +0000 (12:18 -0800)
Switch the driver to use scnprintf() to avoid warnings about potential
truncation of "phys" field which we can tolerate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260113082941.90006-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/tsc40.c

index 9f485cf57a72987cb7656c3da155226cd4d8a4e0..c5dabebaf96d65a35ed0a1fc56244551630a5059 100644 (file)
@@ -92,7 +92,7 @@ static int tsc_connect(struct serio *serio, struct serio_driver *drv)
 
        ptsc->serio = serio;
        ptsc->dev = input_dev;
-       snprintf(ptsc->phys, sizeof(ptsc->phys), "%s/input0", serio->phys);
+       scnprintf(ptsc->phys, sizeof(ptsc->phys), "%s/input0", serio->phys);
 
        input_dev->name = "TSC-10/25/40 Serial TouchScreen";
        input_dev->phys = ptsc->phys;