public inbox for linux-input@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] Input: egalax_ts_serial - switch to use scnprintf() to suppress truncation warning
@ 2026-01-13  8:28 Andy Shevchenko
  0 siblings, 0 replies; only message in thread
From: Andy Shevchenko @ 2026-01-13  8:28 UTC (permalink / raw)
  To: Andy Shevchenko, linux-input, linux-kernel; +Cc: Dmitry Torokhov

Switch the driver to use scnprintf() to avoid warnings about potential
truncation of "phys" field which we can tolerate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/input/touchscreen/egalax_ts_serial.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/egalax_ts_serial.c b/drivers/input/touchscreen/egalax_ts_serial.c
index 07a4aa1c19bb..5f284490a298 100644
--- a/drivers/input/touchscreen/egalax_ts_serial.c
+++ b/drivers/input/touchscreen/egalax_ts_serial.c
@@ -108,8 +108,7 @@ static int egalax_connect(struct serio *serio, struct serio_driver *drv)
 
 	egalax->serio = serio;
 	egalax->input = input_dev;
-	snprintf(egalax->phys, sizeof(egalax->phys),
-		 "%s/input0", serio->phys);
+	scnprintf(egalax->phys, sizeof(egalax->phys), "%s/input0", serio->phys);
 
 	input_dev->name = "EETI eGalaxTouch Serial TouchScreen";
 	input_dev->phys = egalax->phys;
-- 
2.50.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-01-13  8:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-13  8:28 [PATCH v1 1/1] Input: egalax_ts_serial - switch to use scnprintf() to suppress truncation warning Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox