]> www.infradead.org Git - users/jedix/linux-maple.git/commit
platform/x86: compal-laptop: use sysfs_emit() instead of sprintf()
authorchen zhang <chenzhang@kylinos.cn>
Mon, 28 Oct 2024 02:49:49 +0000 (10:49 +0800)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 29 Oct 2024 13:54:41 +0000 (15:54 +0200)
commitf60933390852beb1fbbcad12df5e261cf8312a9b
treec54d954fc987e5192ce99d1505d8c82b0f0a20ff
parente001341a984e709e377b275123aecb5a763eaef9
platform/x86: compal-laptop: use sysfs_emit() instead of sprintf()

Follow the advice in Documentation/filesystems/sysfs.rst:
show() should only use sysfs_emit() or sysfs_emit_at() when formatting
the value to be returned to user space.

Signed-off-by: chen zhang <chenzhang@kylinos.cn>
Link: https://lore.kernel.org/r/20241028024949.24746-1-chenzhang@kylinos.cn
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/compal-laptop.c