From: Ping-Ke Shih <pkshih@realtek.com>
To: Zong-Zhe Yang <kevin_yang@realtek.com>,
Mande Imran Ahmed <immu.ahmed1905@gmail.com>,
"rtl8821cerfe2@gmail.com" <rtl8821cerfe2@gmail.com>,
Bernie Huang <phhuang@realtek.com>,
Damon Chen <damon.chen@realtek.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] net:realtek:use sysfs_emit() instead of scnprintf() for sysfs consistency
Date: Thu, 24 Jul 2025 08:57:19 +0000 [thread overview]
Message-ID: <f420a63d63334e5b97e7562ce5be0d5d@realtek.com> (raw)
In-Reply-To: <a28456f5b8d2477785493c6081f24401@realtek.com>
Zong-Zhe Yang <kevin_yang@realtek.com> wrote:
> Mande Imran Ahmed <immu.ahmed1905@gmail.com> wrote:
> >
> > Update the Realtek rtw89 wireless driver to replace scnprintf() with
> > sysfs_emit() for formatting sysfs attribute output, in line with the recommendations from
> > Documentation/filesystems/sysfs.rst.
This is for sysfs, no? But this patch is related to debugfs, which buffer
size isn't PAGE_SIZE. Please refer to implementation of sysfs_emit().
So NACK.
> >
> > This change enhances the safety and correctness of sysfs handling, promotes consistency
> > throughout the kernel, and aids long-term maintainability.
> >
> > Functionality verified using ping, iperf, and connection tests to ensure stability after the
> > change.
> >
> > Signed-off-by: Mande Imran Ahmed <immu.ahmed1905@gmail.com>
[...]
>
> (1.) buffer might not just be allocated with PAGE_SIZE
> (2.) the pointer passed to leaf function might not point to the head of allocated buffer
>
> Will the above cause some problems ?
>
> For (2.), maybe need to tweak them with sysfs_emit_at() instead of sysfs_emit(). !?
The assumption of buffer size in sysfs_emit() is PAGE_SIZE, but this is
totally wrong in rtw89 debugfs.
next prev parent reply other threads:[~2025-07-24 8:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-24 5:50 [PATCH] net:realtek:use sysfs_emit() instead of scnprintf() for sysfs consistency Mande Imran Ahmed
2025-07-24 8:42 ` Zong-Zhe Yang
2025-07-24 8:57 ` Ping-Ke Shih [this message]
2025-07-28 11:31 ` Mande Imran Ahmed
2025-07-28 11:26 ` [PATCH v2] " Mande Imran Ahmed
2025-07-29 1:33 ` Ping-Ke Shih
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=f420a63d63334e5b97e7562ce5be0d5d@realtek.com \
--to=pkshih@realtek.com \
--cc=damon.chen@realtek.com \
--cc=immu.ahmed1905@gmail.com \
--cc=kevin_yang@realtek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=phhuang@realtek.com \
--cc=rtl8821cerfe2@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.