From: Jiri Slaby <jirislaby@kernel.org>
To: xie.ludan@zte.com.cn, tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH linux-next] genirq: use sysfs_emit() instead of scnprintf().
Date: Mon, 17 Mar 2025 07:37:56 +0100 [thread overview]
Message-ID: <c2cf45ed-95ac-482c-9710-06cacc0189f9@kernel.org> (raw)
In-Reply-To: <20250317142730784jyJNa1DQf10K4kIqtJw3w@zte.com.cn>
On 17. 03. 25, 7:27, xie.ludan@zte.com.cn wrote:
> Date: Fri, 14 Mar 2025 12:05:36 +0800
>
> Follow the advice in Documentation/filesystems/sysfs.rst:
> show() should only use sysfs_emit() or sysfs_emit_at() when formatting
> the value to be returned to user space.
>
> Signed-off-by: XieLudan <xie.ludan@zte.com.cn>
I point you to study Documentation/process/submitting-patches.rst first.
In particular, I am missing versioning and versionlog.
I would also appreciate being CCed on next versions of patches I am
reviewing.
> --- a/kernel/irq/irqdesc.c
> +++ b/kernel/irq/irqdesc.c
> @@ -257,11 +257,11 @@ static ssize_t per_cpu_count_show(struct kobject *kobj,
> for_each_possible_cpu(cpu) {
> unsigned int c = irq_desc_kstat_cpu(desc, cpu);
>
> - ret += scnprintf(buf + ret, PAGE_SIZE - ret, "%s%u", p, c);
> + ret += sysfs_emit(buf + ret, "%s%u", p, c);
Sadly, the more important concern I had remained.
regards,
--
js
suse labs
next prev parent reply other threads:[~2025-03-17 6:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-17 6:27 [PATCH linux-next] genirq: use sysfs_emit() instead of scnprintf() xie.ludan
2025-03-17 6:37 ` Jiri Slaby [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-03-15 6:17 xie.ludan
2025-03-17 6:07 ` Jiri Slaby
2025-03-17 6:12 ` Jiri Slaby
2025-03-17 6:17 ` Jiri Slaby
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=c2cf45ed-95ac-482c-9710-06cacc0189f9@kernel.org \
--to=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=xie.ludan@zte.com.cn \
/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