Skip to content

Commit b58a2c1

Browse files
andy-shevdtor
authored andcommitted
Input: tsc40 - 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. 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>
1 parent 9f18271 commit b58a2c1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/input/touchscreen/tsc40.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static int tsc_connect(struct serio *serio, struct serio_driver *drv)
9292

9393
ptsc->serio = serio;
9494
ptsc->dev = input_dev;
95-
snprintf(ptsc->phys, sizeof(ptsc->phys), "%s/input0", serio->phys);
95+
scnprintf(ptsc->phys, sizeof(ptsc->phys), "%s/input0", serio->phys);
9696

9797
input_dev->name = "TSC-10/25/40 Serial TouchScreen";
9898
input_dev->phys = ptsc->phys;

0 commit comments

Comments
 (0)