mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Mande Imran Ahmed <immu.ahmed1905@gmail.com>,
	Zong-Zhe Yang <kevin_yang@realtek.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 v2] net:realtek:use sysfs_emit() instead of scnprintf() for sysfs consistency
Date: Tue, 29 Jul 2025 01:33:05 +0000	[thread overview]
Message-ID: <532f36a2a3524f2aac67b95935387302@realtek.com> (raw)
In-Reply-To: <20250728112638.39412-1-immu.ahmed1905@gmail.com>

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.

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@gmail.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);

[...]


      reply	other threads:[~2025-07-29  1:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-24  5:50 [PATCH] " Mande Imran Ahmed
2025-07-24  8:42 ` Zong-Zhe Yang
2025-07-24  8:57   ` Ping-Ke Shih
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 [this message]

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=532f36a2a3524f2aac67b95935387302@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®