diff options
| author | Tao Cui <[email protected]> | 2025-09-18 11:44:04 +0000 |
|---|---|---|
| committer | Huacai Chen <[email protected]> | 2025-09-18 11:44:04 +0000 |
| commit | d6d69f0edde63b553345d4efaceb7daed89fe04c (patch) | |
| tree | 1c6ee0b89ffb8800a471ad6fcc244f336171505b | |
| parent | LoongArch: Check the return value when creating kobj (diff) | |
| download | kernel-d6d69f0edde63b553345d4efaceb7daed89fe04c.tar.gz kernel-d6d69f0edde63b553345d4efaceb7daed89fe04c.zip | |
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: [email protected]
Signed-off-by: Tao Cui <[email protected]>
Signed-off-by: Huacai Chen <[email protected]>
| -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" |
