linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: tty: replace snprintf in show functions with sysfs_emit
@ 2021-10-28 10:13 cgel.zte
  2021-10-28 12:22 ` Johan Hovold
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: cgel.zte @ 2021-10-28 10:13 UTC (permalink / raw)
  To: gregkh
  Cc: jirislaby, johan, macro, fancer.lancer, andrew, pali,
	linux-serial, linux-kernel, Jing Yao, Zeal Robot

From: Jing Yao <yao.jing2@zte.com.cn>

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jing Yao <yao.jing2@zte.com.cn>
---
 drivers/tty/serial/8250/8250_port.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 5775cbff8f6e..557e8b13b5c1 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -3099,7 +3099,7 @@ static ssize_t rx_trig_bytes_show(struct device *dev,
 	if (rxtrig_bytes < 0)
 		return rxtrig_bytes;
 
-	return snprintf(buf, PAGE_SIZE, "%d\n", rxtrig_bytes);
+	return sysfs_emit(buf, PAGE_SIZE, "%d\n", rxtrig_bytes);
 }
 
 static int do_set_rxtrig(struct tty_port *port, unsigned char bytes)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-11-08  9:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28 10:13 [PATCH] drivers: tty: replace snprintf in show functions with sysfs_emit cgel.zte
2021-10-28 12:22 ` Johan Hovold
2021-10-28 12:49   ` Maciej W. Rozycki
2021-10-28 20:57 ` kernel test robot
2021-10-28 23:49 ` kernel test robot
2021-10-29  5:44 ` Greg KH
2021-10-31 15:34   ` Joe Perches
2021-11-02  6:52     ` [PATCH v2] " cgel.zte
2021-11-02  7:44       ` Johan Hovold
2021-11-04 11:47         ` [PATCH v3] serial: 8250: " cgel.zte
2021-11-08  9:54           ` Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).