Skip to content

Commit d6d69f0

Browse files
Tao Cuichenhuacai
authored andcommitted
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>
1 parent 51adb03 commit d6d69f0

File tree

1 file changed

+1
-1
lines changed
  • arch/loongarch/kernel

1 file changed

+1
-1
lines changed

arch/loongarch/kernel/env.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ late_initcall(fdt_cpu_clk_init);
8686
static ssize_t boardinfo_show(struct kobject *kobj,
8787
struct kobj_attribute *attr, char *buf)
8888
{
89-
return sprintf(buf,
89+
return sysfs_emit(buf,
9090
"BIOS Information\n"
9191
"Vendor\t\t\t: %s\n"
9292
"Version\t\t\t: %s\n"

0 commit comments

Comments
 (0)