serial: 8250_aspeed_vuart: replace snprintf with sysfs_emit
authorYang Guang <yang.guang5@zte.com.cn>
Sat, 12 Feb 2022 02:19:48 +0000 (10:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Feb 2022 09:35:36 +0000 (10:35 +0100)
commitc5e453f9c9a97c03d6c050a2bfbe6859fe1d9d5a
treea649648751e889d5770cf188cda28a8330e34982
parent6ba6351b023eb8a6e8919f4aa5b85241b2025ca2
serial: 8250_aspeed_vuart: replace snprintf with sysfs_emit

coccinelle report:
./drivers/tty/serial/8250/8250_aspeed_vuart.c:85:8-16:
WARNING: use scnprintf or sprintf
./drivers/tty/serial/8250/8250_aspeed_vuart.c:174:8-16:
WARNING: use scnprintf or sprintf
./drivers/tty/serial/8250/8250_aspeed_vuart.c:127:8-16:
WARNING: use scnprintf or sprintf

Use sysfs_emit instead of scnprintf or sprintf makes more sense.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>
Signed-off-by: David Yang <davidcomponentone@gmail.com>
Link: https://lore.kernel.org/r/fed40753603dac4d14b17970c88e6f5f936348c1.1644541843.git.yang.guang5@zte.com.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_aspeed_vuart.c