Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: cuitao@kylinos.cn, chenhuacai@loongson.cn
Cc: stable@vger.kernel.org
Subject: Re: WTF: patch "[PATCH] LoongArch: Replace sprintf() with sysfs_emit()" was seriously submitted to be applied to the 6.16-stable tree?
Date: Sun, 21 Sep 2025 14:26:27 +0200	[thread overview]
Message-ID: <2025092104-stubbly-nimble-b45f@gregkh> (raw)
In-Reply-To: <2025092101-lushly-steering-6b45@gregkh>

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

  reply	other threads:[~2025-09-21 12:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2025-09-22  0:49   ` 陈华才

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2025092104-stubbly-nimble-b45f@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=chenhuacai@loongson.cn \
    --cc=cuitao@kylinos.cn \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox