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 <andriy.shevchenko@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
@@ -1191,8 +1191,8 @@ static void atkbd_set_device_attrs(struct atkbd *atkbd)
|
||||
"AT %s Set %d keyboard",
|
||||
atkbd->translated ? "Translated" : "Raw", atkbd->set);
|
||||
|
||||
snprintf(atkbd->phys, sizeof(atkbd->phys),
|
||||
"%s/input0", atkbd->ps2dev.serio->phys);
|
||||
scnprintf(atkbd->phys, sizeof(atkbd->phys),
|
||||
"%s/input0", atkbd->ps2dev.serio->phys);
|
||||
|
||||
input_dev->name = atkbd->name;
|
||||
input_dev->phys = atkbd->phys;
|
||||
|
||||
Reference in New Issue
Block a user