]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Input: alps - use scnprintf() to suppress truncation warning
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 30 Jun 2025 08:21:52 +0000 (11:21 +0300)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 30 Jun 2025 16:45:46 +0000 (09:45 -0700)
The commit 76c968e75715 ("Input: alps - switch to use scnprintf() to suppress
truncation warning") converted one place in the driver while the other left
untouched. Convert the other place as well.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20250630082245.1416796-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/alps.c

index 01f270509f03ce19ae7e8d78153b350cdca2a412..51056f77a8c9bc6aa7f8db7dcd0c50e9041ac89e 100644 (file)
@@ -3103,8 +3103,8 @@ int alps_init(struct psmouse *psmouse)
                        goto init_fail;
                }
 
-               snprintf(priv->phys2, sizeof(priv->phys2), "%s/input1",
-                        psmouse->ps2dev.serio->phys);
+               scnprintf(priv->phys2, sizeof(priv->phys2), "%s/input1",
+                         psmouse->ps2dev.serio->phys);
                dev2->phys = priv->phys2;
 
                /*