[PATCH] net: atm: use sysfs_emit_at() instead of scnprintf()

tang.dongxing@zte.com.cn posted 1 patch 9 months ago
net/atm/atm_sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] net: atm: use sysfs_emit_at() instead of scnprintf()
Posted by tang.dongxing@zte.com.cn 9 months ago
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(-)

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],
-- 
2.25.1
Re: [PATCH] net: atm: use sysfs_emit_at() instead of scnprintf()
Posted by Krzysztof Kozlowski 9 months ago
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
Re: [PATCH] net: atm: use sysfs_emit_at() instead of scnprintf()
Posted by tang.dongxing@zte.com.cn 9 months ago
>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
Re: [PATCH] net: atm: use sysfs_emit_at() instead of scnprintf()
Posted by Simon Horman 9 months ago
On Mon, Mar 17, 2025 at 05:09:02PM +0800, tang.dongxing@zte.com.cn wrote:
> >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

Thanks Tang Dongxing,

Further to Krzystof's comments: please coordinate with your colleague
Xie Ludan who has also posted a patch in this area.

  https://lore.kernel.org/all/20250317152933756kWrF1Y_e-2EKtrR_GGegq@zte.com.cn/

It will be much easier for review if there is a single patch
that addresses these issues for ATM.

Also, please consider reading the following guidance on processes
for the networking subsystem of the Linux kernel. These are similar
but different to other subsystems.

  https://docs.kernel.org/process/maintainer-netdev.html

-- 
pw-bot: changes-requested
Re: [PATCH] net: atm: use sysfs_emit_at() instead of scnprintf()
Posted by tang.dongxing@zte.com.cn 9 months ago
>On Mon, Mar 17, 2025 at 05:09:02PM +0800, tang.dongxing@zte.com.cn wrote:
>> >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
>
>Thanks Tang Dongxing,
>
>Further to Krzystof's comments: please coordinate with your colleague
>Xie Ludan who has also posted a patch in this area.
>
>  https://lore.kernel.org/all/20250317152933756kWrF1Y_e-2EKtrR_GGegq@zte.com.cn/
>
>It will be much easier for review if there is a single patch
>that addresses these issues for ATM.
>
>Also, please consider reading the following guidance on processes
>for the networking subsystem of the Linux kernel. These are similar
>but different to other subsystems.
>
>  https://docs.kernel.org/process/maintainer-netdev.html

Dear SimonHroman,

Thank you for your guidance. I have contacted Xie Ludan,
we recommend that the community review be based on the https://lore.kernel.org/all/20250317152933756kWrF1Y_e-2EKtrR_GGegq@zte.com.cn/
I will carefully read the the networking subsystem guidance before sending any further updates.

Best regard,

Tang Dongxing





Original


From: horms <horms@kernel.org>
To: Tang Dongxing10346056;
Cc: krzk <krzk@kernel.org>;davem <davem@davemloft.net>;Feng Wei10332721;Shao Mingyin10345846;Xie Ludan00297061;edumazet <edumazet@google.com>;kuba <kuba@kernel.org>;pabeni <pabeni@redhat.com>;netdev <netdev@vger.kernel.org>;linux-kernel <linux-kernel@vger.kernel.org>;Yang Guang10296924;Yang Yang10192021;Ye Xingchen10329245;Xu Xin10311587;
Date: 2025/03/20 19:44
Subject: Re: [PATCH] net: atm: use sysfs_emit_at() instead of scnprintf()

On Mon, Mar 17, 2025 at 05:09:02PM +0800, tang.dongxing@zte.com.cn wrote:
> >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
 
Thanks Tang Dongxing,
 
Further to Krzystof's comments: please coordinate with your colleague
Xie Ludan who has also posted a patch in this area.
 
  https://lore.kernel.org/all/20250317152933756kWrF1Y_e-2EKtrR_GGegq@zte.com.cn/
 
It will be much easier for review if there is a single patch
that addresses these issues for ATM.
 
Also, please consider reading the following guidance on processes
for the networking subsystem of the Linux kernel. These are similar
but different to other subsystems.
 
  https://docs.kernel.org/process/maintainer-netdev.html
 
--  
pw-bot: changes-requested
Re: [PATCH] net: atm: use sysfs_emit_at() instead of scnprintf()
Posted by Simon Horman 8 months, 3 weeks ago
On Fri, Mar 21, 2025 at 10:45:57AM +0800, tang.dongxing@zte.com.cn wrote:
> >On Mon, Mar 17, 2025 at 05:09:02PM +0800, tang.dongxing@zte.com.cn wrote:
> >> >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
> >
> >Thanks Tang Dongxing,
> >
> >Further to Krzystof's comments: please coordinate with your colleague
> >Xie Ludan who has also posted a patch in this area.
> >
> >  https://lore.kernel.org/all/20250317152933756kWrF1Y_e-2EKtrR_GGegq@zte.com.cn/
> >
> >It will be much easier for review if there is a single patch
> >that addresses these issues for ATM.
> >
> >Also, please consider reading the following guidance on processes
> >for the networking subsystem of the Linux kernel. These are similar
> >but different to other subsystems.
> >
> >  https://docs.kernel.org/process/maintainer-netdev.html
> 
> Dear SimonHroman,
> 
> Thank you for your guidance. I have contacted Xie Ludan,
> we recommend that the community review be based on the https://lore.kernel.org/all/20250317152933756kWrF1Y_e-2EKtrR_GGegq@zte.com.cn/

Thanks, understood.

> I will carefully read the the networking subsystem guidance before sending any further updates.

Likewise, thanks.