]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Input: egalax_ts_serial - switch to use scnprintf() to suppress truncation warning
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 20 Jan 2026 20:00:18 +0000 (12:00 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 20 Jan 2026 20:16:44 +0000 (12:16 -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/20260113082851.83584-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/egalax_ts_serial.c

index 07a4aa1c19bbca9f47662b143819ddbfd532140c..5f284490a29821fb979d2146d52eddf67e8f07b4 100644 (file)
@@ -108,8 +108,7 @@ static int egalax_connect(struct serio *serio, struct serio_driver *drv)
 
        egalax->serio = serio;
        egalax->input = input_dev;
-       snprintf(egalax->phys, sizeof(egalax->phys),
-                "%s/input0", serio->phys);
+       scnprintf(egalax->phys, sizeof(egalax->phys), "%s/input0", serio->phys);
 
        input_dev->name = "EETI eGalaxTouch Serial TouchScreen";
        input_dev->phys = egalax->phys;