]> www.infradead.org Git - users/jedix/linux-maple.git/commit
platform/mellanox: mlxreg-hotplug: use sysfs_emit() instead of sprintf()
authorAi Chao <aichao@kylinos.cn>
Thu, 16 Jan 2025 08:10:00 +0000 (16:10 +0800)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 20 Jan 2025 12:13:20 +0000 (14:13 +0200)
commitfcf1b6f8d8248b4c79e5f7c506010d389f1e4f16
tree9ae2166e85ffb9d236f11587c50955494139721f
parent9886f575de5aefcfab537467c72e5176e5301df0
platform/mellanox: mlxreg-hotplug: 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: Ai Chao <aichao@kylinos.cn>
Acked-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/20250116081000.2900435-1-aichao@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/mellanox/mlxreg-hotplug.c