Skip to content

Commit 805f5bb

Browse files
committed
Input: psmouse - 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. Reported-by: Andy Shevchenko <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent ce098f2 commit 805f5bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/mouse/psmouse-base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1600,7 +1600,7 @@ static int psmouse_connect(struct serio *serio, struct serio_driver *drv)
16001600
psmouse_pre_receive_byte, psmouse_receive_byte);
16011601
INIT_DELAYED_WORK(&psmouse->resync_work, psmouse_resync);
16021602
psmouse->dev = input_dev;
1603-
snprintf(psmouse->phys, sizeof(psmouse->phys), "%s/input0", serio->phys);
1603+
scnprintf(psmouse->phys, sizeof(psmouse->phys), "%s/input0", serio->phys);
16041604

16051605
psmouse_set_state(psmouse, PSMOUSE_INITIALIZING);
16061606

0 commit comments

Comments
 (0)