diff mbox series

net: atm: use sysfs_emit_at() instead of scnprintf()

Message ID 20250317155102808MZdMkiovw52X0oY7n47wI@zte.com.cn (mailing list archive)
State New
Headers show
Series net: atm: use sysfs_emit_at() instead of scnprintf() | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

tang.dongxing@zte.com.cn March 17, 2025, 7:51 a.m. UTC
From: TangDongxing <tang.dongxing@zte.com.cn>

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: TangDongxing <tang.dongxing@zte.com.cn>
---
 net/atm/atm_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Krzysztof Kozlowski March 17, 2025, 8:16 a.m. UTC | #1
On 17/03/2025 08:51, tang.dongxing@zte.com.cn wrote:
> From: TangDongxing <tang.dongxing@zte.com.cn>
> 
> 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: TangDongxing <tang.dongxing@zte.com.cn>

Dear ZTE,

Can you slow down? You sent a bunch of emails with similar issues which
means that dozen of maintainers will deal with the same issues
independently. This looks like another vivo or huawei style submission,
leading to bugs sneaked via flood of patches.

First, fix the name used in the SoB (see submitting patches) to match
Latin transcription.

Second, use proper SoB chain, see submitting patches.

Third, really, really be sure that what you send is correct. You already
got quite responses, but you still keep sending patches.

Fourth, respond to received feedback instead of flooding us with more of
this!


Best regards,
Krzysztof
tang.dongxing@zte.com.cn March 17, 2025, 9:09 a.m. UTC | #2
>On 17/03/2025 08:51, tang.dongxing@zte.com.cn wrote:> From: TangDongxing <tang.dongxing@zte.com.cn>
>> 
>> 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: Tang Dongxing <tang.dongxing@zte.com.cn>Dear ZTE,
>
>Can you slow down? You sent a bunch of emails with similar issues which
>means that dozen of maintainers will deal with the same issues
>independently. This looks like another vivo or huawei style submission,
>leading to bugs sneaked via flood of patches.
>
>First, fix the name used in the SoB (see submitting patches) to match
>Latin transcription.
>
>Second, use proper SoB chain, see submitting patches.
>
>Third, really, really be sure that what you send is correct. You already
>got quite responses, but you still keep sending patches.
>
>Fourth, respond to received feedback instead of flooding us with more of
>this!

Dear Krzysztof,
Thank you for your feedback. I apologize for my previous submissions.
Regarding the issues you've pointed out:
I will correct the name used in the SoB to ensure it matches the Latin transcription as required.
I will double-check my work before sending any further updates.
I appreciate your guidance and will follow the submission guidelines more carefully going forward. If you have any further advice or resources to help me improve my submissions, I would be grateful for your input.
Best regards, 
Tang Dongxing
diff mbox series

Patch

diff --git a/net/atm/atm_sysfs.c b/net/atm/atm_sysfs.c
index 54e7fb1a4ee5..d06ffadc5139 100644
--- a/net/atm/atm_sysfs.c
+++ b/net/atm/atm_sysfs.c
@@ -37,7 +37,7 @@  static ssize_t atmaddress_show(struct device *cdev,

 	spin_lock_irqsave(&adev->lock, flags);
 	list_for_each_entry(aaddr, &adev->local, entry) {
-		count += scnprintf(buf + count, PAGE_SIZE - count,
+		count += sysfs_emit_at(buf, count,
 				   "%1phN.%2phN.%10phN.%6phN.%1phN\n",
 				   &aaddr->addr.sas_addr.prv[0],
 				   &aaddr->addr.sas_addr.prv[1],