]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: thinkpad_acpi: Fix coccinelle warnings
authorYe Guojin <ye.guojin@zte.com.cn>
Mon, 18 Oct 2021 09:17:50 +0000 (09:17 +0000)
committerHans de Goede <hdegoede@redhat.com>
Tue, 19 Oct 2021 15:18:37 +0000 (17:18 +0200)
commitf5f77e5140629cd909d34569e5ba03d107cc87e3
tree6ae9b635c4d527fa586a1b22714a67152cade50f
parentd9473372b1078954983eb21a33f6d7bdccd1ee6f
platform/x86: thinkpad_acpi: Fix coccinelle warnings

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/20211018091750.858826-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/thinkpad_acpi.c