Skip to content

Commit c2f24e9

Browse files
andy-shevdtor
authored andcommitted
Input: hampshire - 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/20260113082905.83718-1-andriy.shevchenko@linux.intel.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent ed9b2fc commit c2f24e9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/input/touchscreen/hampshire.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ static int hampshire_connect(struct serio *serio, struct serio_driver *drv)
118118

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

124124
input_dev->name = "Hampshire Serial TouchScreen";
125125
input_dev->phys = phampshire->phys;

0 commit comments

Comments
 (0)