Skip to content

Commit 9f18271

Browse files
andy-shevdtor
authored andcommitted
Input: touchwin - 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/20260113082938.89437-1-andriy.shevchenko@linux.intel.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 2d3bb71 commit 9f18271

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/input/touchscreen/touchwin.c

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

119119
tw->serio = serio;
120120
tw->dev = input_dev;
121-
snprintf(tw->phys, sizeof(tw->phys), "%s/input0", serio->phys);
121+
scnprintf(tw->phys, sizeof(tw->phys), "%s/input0", serio->phys);
122122

123123
input_dev->name = "Touchwindow Serial TouchScreen";
124124
input_dev->phys = tw->phys;

0 commit comments

Comments
 (0)