]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: panasonic-laptop: Replace snprintf in show functions with sysfs_emit
authorQing Wang <wangqing@vivo.com>
Fri, 15 Oct 2021 06:50:40 +0000 (23:50 -0700)
committerHans de Goede <hdegoede@redhat.com>
Tue, 19 Oct 2021 14:59:44 +0000 (16:59 +0200)
commitd9473372b1078954983eb21a33f6d7bdccd1ee6f
treed228e132733c4f5f3c7a255e9dceb6147aefd06b
parentced58b258f7fe339fc16bf9f9688393f02d8b0b4
platform/x86: panasonic-laptop: Replace snprintf in show functions with sysfs_emit

show() must not use snprintf() when formatting the value to be
returned to user space.

Fix the coccicheck warnings:
WARNING: use scnprintf or sprintf.

Use sysfs_emit instead of scnprintf or sprintf makes more sense.

Signed-off-by: Qing Wang <wangqing@vivo.com>
Link: https://lore.kernel.org/r/1634280641-4862-1-git-send-email-wangqing@vivo.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/panasonic-laptop.c