From: Andy Shevchenko Date: Tue, 20 Jan 2026 20:03:46 +0000 (-0800) Subject: Input: penmount - switch to use scnprintf() to suppress truncation warning X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1828b52063117fa48db4c3dd637ee320bb2a788b;p=thirdparty%2Fkernel%2Flinux.git Input: penmount - 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. Signed-off-by: Andy Shevchenko Link: https://patch.msgid.link/20260113082926.87049-1-andriy.shevchenko@linux.intel.com Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/touchscreen/penmount.c b/drivers/input/touchscreen/penmount.c index 95adede26703..e027c71cffd9 100644 --- a/drivers/input/touchscreen/penmount.c +++ b/drivers/input/touchscreen/penmount.c @@ -208,7 +208,7 @@ static int pm_connect(struct serio *serio, struct serio_driver *drv) pm->serio = serio; pm->dev = input_dev; - snprintf(pm->phys, sizeof(pm->phys), "%s/input0", serio->phys); + scnprintf(pm->phys, sizeof(pm->phys), "%s/input0", serio->phys); pm->maxcontacts = 1; input_dev->name = "PenMount Serial TouchScreen";