[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <532f36a2a3524f2aac67b95935387302@realtek.com>
Date: Tue, 29 Jul 2025 01:33:05 +0000
From: Ping-Ke Shih <pkshih@...ltek.com>
To: Mande Imran Ahmed <immu.ahmed1905@...il.com>,
Zong-Zhe Yang
<kevin_yang@...ltek.com>,
"rtl8821cerfe2@...il.com"
<rtl8821cerfe2@...il.com>,
Bernie Huang <phhuang@...ltek.com>,
Damon Chen
<damon.chen@...ltek.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2] net:realtek:use sysfs_emit() instead of scnprintf() for sysfs consistency
Mande Imran Ahmed <immu.ahmed1905@...il.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.
As mentioned in v1. This is debugfs, not sysfs. The assumption of PAGE_SIZE
buffer can't be guaranteed. More, this driver must not depend on sysfs.
NACK. Please do not try to respin patch by v3 I'll ignore it.
>
> 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 changes.
>
> Changes since v1:
> - Replaced sysfs_emit() with sysfs_emit_at()
> - Removed unused function parameters.
>
> Signed-off-by: Mande Imran Ahmed <immu.ahmed1905@...il.com>
[...]
>
> - p += sysfs_emit(p, "ChainA offset: %d dBm\n", offset_patha);
> - p += sysfs_emit(p, "ChainB offset: %d dBm\n", offset_pathb);
By the way, the original driver never uses sysfs_emit().
> + len = sysfs_emit(buf, "ChainA offset: %d dBm\n", offset_patha);
> + len += sysfs_emit_at(buf, len, "ChainB offset: %d dBm\n", offset_pathb);
[...]
Powered by blists - more mailing lists