Skip to content

Commit 597c12d

Browse files
andy-shevdtor
authored andcommitted
Input: mtouch - 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/20260113082921.86167-1-andriy.shevchenko@linux.intel.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 6dd774d commit 597c12d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/input/touchscreen/mtouch.c

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

138138
mtouch->serio = serio;
139139
mtouch->dev = input_dev;
140-
snprintf(mtouch->phys, sizeof(mtouch->phys), "%s/input0", serio->phys);
140+
scnprintf(mtouch->phys, sizeof(mtouch->phys), "%s/input0", serio->phys);
141141

142142
input_dev->name = "MicroTouch Serial TouchScreen";
143143
input_dev->phys = mtouch->phys;

0 commit comments

Comments
 (0)