Skip to content

Commit 4ecc731

Browse files
committed
Input: atkbd - 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 05286c5 commit 4ecc731

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/input/keyboard/atkbd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,8 +1191,8 @@ static void atkbd_set_device_attrs(struct atkbd *atkbd)
11911191
"AT %s Set %d keyboard",
11921192
atkbd->translated ? "Translated" : "Raw", atkbd->set);
11931193

1194-
snprintf(atkbd->phys, sizeof(atkbd->phys),
1195-
"%s/input0", atkbd->ps2dev.serio->phys);
1194+
scnprintf(atkbd->phys, sizeof(atkbd->phys),
1195+
"%s/input0", atkbd->ps2dev.serio->phys);
11961196

11971197
input_dev->name = atkbd->name;
11981198
input_dev->phys = atkbd->phys;

0 commit comments

Comments
 (0)