]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
LoongArch: Replace sprintf() with sysfs_emit()
authorTao Cui <cuitao@kylinos.cn>
Thu, 18 Sep 2025 11:44:04 +0000 (19:44 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Thu, 18 Sep 2025 11:44:04 +0000 (19:44 +0800)
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>
arch/loongarch/kernel/env.c

index be309a71f204910dba1af5ecbc1c2a042d1f3179..23bd5ae2212c267e408c5d050b6c1ec1af2d6483 100644 (file)
@@ -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"