]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: lg-laptop: replace snprintf in show functions with sysfs_emit
authorYe Guojin <ye.guojin@zte.com.cn>
Fri, 22 Oct 2021 09:07:22 +0000 (09:07 +0000)
committerHans de Goede <hdegoede@redhat.com>
Fri, 22 Oct 2021 09:13:14 +0000 (11:13 +0200)
commitc0b65b99f12268991b1cd512fed8ae8a1e14a900
tree2d21074421a75807cf7531040b4c366909fd6c1b
parent79440630e4956da6772da0cefdad945753ecf4d0
platform/x86: lg-laptop: replace snprintf in show functions with sysfs_emit

coccicheck complains about the use of snprintf() in sysfs show
functions:
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: Ye Guojin <ye.guojin@zte.com.cn>
Link: https://lore.kernel.org/r/20211022090722.1065457-1-ye.guojin@zte.com.cn
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/lg-laptop.c