From: Tao Cui Date: Thu, 18 Sep 2025 11:44:04 +0000 (+0800) Subject: LoongArch: Replace sprintf() with sysfs_emit() X-Git-Tag: v6.17-rc7~13^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d6d69f0edde63b553345d4efaceb7daed89fe04c;p=thirdparty%2Fkernel%2Fstable.git 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 Signed-off-by: Huacai Chen --- diff --git a/arch/loongarch/kernel/env.c b/arch/loongarch/kernel/env.c index be309a71f2049..23bd5ae2212c2 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"