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)
commit2d5b0755b754fcb39598df87b3a8656a569e9979
treed228e132733c4f5f3c7a255e9dceb6147aefd06b
parent043449e7516106826346d9923a81da0310a387de
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