diff options
author | Tao Cui <cuitao@kylinos.cn> | 2025-09-18 19:44:04 +0800 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2025-09-18 19:44:04 +0800 |
commit | d6d69f0edde63b553345d4efaceb7daed89fe04c (patch) | |
tree | 1c6ee0b89ffb8800a471ad6fcc244f336171505b | |
parent | 51adb03e6b865c0c6790f29659ff52d56742de2e (diff) |
LoongArch: Replace sprintf() with sysfs_emit()
As Documentation/filesystems/sysfs.rst suggested, show() should only use
sysfs_emit() or sysfs_emit_at() when formatting the value to be returned
to user space.
No functional change intended.
Cc: stable@vger.kernel.org
Signed-off-by: Tao Cui <cuitao@kylinos.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
-rw-r--r-- | arch/loongarch/kernel/env.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/loongarch/kernel/env.c b/arch/loongarch/kernel/env.c index be309a71f204..23bd5ae2212c 100644 --- a/arch/loongarch/kernel/env.c +++ b/arch/loongarch/kernel/env.c @@ -86,7 +86,7 @@ late_initcall(fdt_cpu_clk_init); static ssize_t boardinfo_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { - return sprintf(buf, + return sysfs_emit(buf, "BIOS Information\n" "Vendor\t\t\t: %s\n" "Version\t\t\t: %s\n" |