Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: alps - 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>

+3 -3
+3 -3
drivers/input/mouse/alps.c
··· 1408 1408 return -ENOMEM; 1409 1409 } 1410 1410 1411 - snprintf(priv->phys3, sizeof(priv->phys3), "%s/%s", 1412 - psmouse->ps2dev.serio->phys, 1413 - (priv->dev2 ? "input2" : "input1")); 1411 + scnprintf(priv->phys3, sizeof(priv->phys3), "%s/%s", 1412 + psmouse->ps2dev.serio->phys, 1413 + (priv->dev2 ? "input2" : "input1")); 1414 1414 dev3->phys = priv->phys3; 1415 1415 1416 1416 /*