* WTF: patch "[PATCH] LoongArch: Replace sprintf() with sysfs_emit()" was seriously submitted to be applied to the 6.16-stable tree?
@ 2025-09-21 12:24 gregkh
2025-09-21 12:26 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2025-09-21 12:24 UTC (permalink / raw)
To: cuitao, chenhuacai; +Cc: stable
The patch below was submitted to be applied to the 6.16-stable tree.
I fail to see how this patch meets the stable kernel rules as found at
Documentation/process/stable-kernel-rules.rst.
I could be totally wrong, and if so, please respond to
<stable@vger.kernel.org> and let me know why this patch should be
applied. Otherwise, it is now dropped from my patch queues, never to be
seen again.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From d6d69f0edde63b553345d4efaceb7daed89fe04c Mon Sep 17 00:00:00 2001
From: Tao Cui <cuitao@kylinos.cn>
Date: Thu, 18 Sep 2025 19:44:04 +0800
Subject: [PATCH] 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>
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"
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: WTF: patch "[PATCH] LoongArch: Replace sprintf() with sysfs_emit()" was seriously submitted to be applied to the 6.16-stable tree?
2025-09-21 12:24 WTF: patch "[PATCH] LoongArch: Replace sprintf() with sysfs_emit()" was seriously submitted to be applied to the 6.16-stable tree? gregkh
@ 2025-09-21 12:26 ` Greg KH
2025-09-22 0:49 ` 陈华才
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2025-09-21 12:26 UTC (permalink / raw)
To: cuitao, chenhuacai; +Cc: stable
On Sun, Sep 21, 2025 at 02:24:01PM +0200, gregkh@linuxfoundation.org wrote:
> The patch below was submitted to be applied to the 6.16-stable tree.
>
> I fail to see how this patch meets the stable kernel rules as found at
> Documentation/process/stable-kernel-rules.rst.
>
> I could be totally wrong, and if so, please respond to
> <stable@vger.kernel.org> and let me know why this patch should be
> applied. Otherwise, it is now dropped from my patch queues, never to be
> seen again.
>
> thanks,
>
> greg k-h
>
> ------------------ original commit in Linus's tree ------------------
>
> >From d6d69f0edde63b553345d4efaceb7daed89fe04c Mon Sep 17 00:00:00 2001
> From: Tao Cui <cuitao@kylinos.cn>
> Date: Thu, 18 Sep 2025 19:44:04 +0800
> Subject: [PATCH] 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>
>
> 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"
Also, this should NOT be a sysfs file. sysfs files are "one value per
file", this should be multiple different sysfs file. Please fix that
up.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Re: WTF: patch "[PATCH] LoongArch: Replace sprintf() with sysfs_emit()" was seriously submitted to be applied to the 6.16-stable tree?
2025-09-21 12:26 ` Greg KH
@ 2025-09-22 0:49 ` 陈华才
0 siblings, 0 replies; 3+ messages in thread
From: 陈华才 @ 2025-09-22 0:49 UTC (permalink / raw)
To: Greg KH; +Cc: cuitao, stable, chenhuacai
> -----原始邮件-----
> 发件人: "Greg KH" <gregkh@linuxfoundation.org>
> 发送时间:2025-09-21 20:26:27 (星期日)
> 收件人: cuitao@kylinos.cn, chenhuacai@loongson.cn
> 抄送: stable@vger.kernel.org
> 主题: Re: WTF: patch "[PATCH] LoongArch: Replace sprintf() with sysfs_emit()" was seriously submitted to be applied to the 6.16-stable tree?
>
> On Sun, Sep 21, 2025 at 02:24:01PM +0200, gregkh@linuxfoundation.org wrote:
> > The patch below was submitted to be applied to the 6.16-stable tree.
> >
> > I fail to see how this patch meets the stable kernel rules as found at
> > Documentation/process/stable-kernel-rules.rst.
> >
> > I could be totally wrong, and if so, please respond to
> > <stable@vger.kernel.org> and let me know why this patch should be
> > applied. Otherwise, it is now dropped from my patch queues, never to be
> > seen again.
> >
> > thanks,
> >
> > greg k-h
> >
> > ------------------ original commit in Linus's tree ------------------
> >
> > >From d6d69f0edde63b553345d4efaceb7daed89fe04c Mon Sep 17 00:00:00 2001
> > From: Tao Cui <cuitao@kylinos.cn>
> > Date: Thu, 18 Sep 2025 19:44:04 +0800
> > Subject: [PATCH] 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>
> >
> > 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"
>
> Also, this should NOT be a sysfs file. sysfs files are "one value per
> file", this should be multiple different sysfs file. Please fix that
> up.
Hi, Cuitao,
Please double check whether your code is correct, thanks.
Huacai
>
> thanks,
>
> greg k-h
本邮件及其附件含有龙芯中科的商业秘密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制或散发)本邮件及其附件中的信息。如果您错收本邮件,请您立即电话或邮件通知发件人并删除本邮件。
This email and its attachments contain confidential information from Loongson Technology , which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this email in error, please notify the sender by phone or email immediately and delete it.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-22 0:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-21 12:24 WTF: patch "[PATCH] LoongArch: Replace sprintf() with sysfs_emit()" was seriously submitted to be applied to the 6.16-stable tree? gregkh
2025-09-21 12:26 ` Greg KH
2025-09-22 0:49 ` 陈华才
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox