Skip to content

Commit 05286c5

Browse files
m42ukodtor
authored andcommitted
Input: fsia6b - suppress buffer truncation warning for phys
Switch the driver to use scnprintf() to avoid warnings about potential truncation of "phys" field which we can tolerate. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Markus Koch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 1ac9aa4 commit 05286c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/joystick/fsia6b.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static int fsia6b_serio_connect(struct serio *serio, struct serio_driver *drv)
149149
}
150150
fsia6b->dev = input_dev;
151151

152-
snprintf(fsia6b->phys, sizeof(fsia6b->phys), "%s/input0", serio->phys);
152+
scnprintf(fsia6b->phys, sizeof(fsia6b->phys), "%s/input0", serio->phys);
153153

154154
input_dev->name = DRIVER_DESC;
155155
input_dev->phys = fsia6b->phys;

0 commit comments

Comments
 (0)