The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH net-next] net: chelsio: cxgb4: Use str_plural() in mem_intr_handler()
@ 2026-07-04 12:10 Thorsten Blum
  2026-07-06 14:10 ` Potnuri Bharat Teja
  2026-07-10 14:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Thorsten Blum @ 2026-07-04 12:10 UTC (permalink / raw)
  To: Potnuri Bharat Teja, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Thorsten Blum, netdev, linux-kernel

Replace the manual ternary "s" pluralization with str_plural() to
simplify the code.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index 6871127427fa..29d7b786e51e 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -33,6 +33,7 @@
  */
 
 #include <linux/delay.h>
+#include <linux/string_choices.h>
 #include "cxgb4.h"
 #include "t4_regs.h"
 #include "t4_values.h"
@@ -4867,7 +4868,7 @@ static void mem_intr_handler(struct adapter *adapter, int idx)
 		if (printk_ratelimit())
 			dev_warn(adapter->pdev_dev,
 				 "%u %s correctable ECC data error%s\n",
-				 cnt, name[idx], cnt > 1 ? "s" : "");
+				 cnt, name[idx], str_plural(cnt));
 	}
 	if (v & ECC_UE_INT_CAUSE_F)
 		dev_alert(adapter->pdev_dev,

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: chelsio: cxgb4: Use str_plural() in mem_intr_handler()
  2026-07-04 12:10 [PATCH net-next] net: chelsio: cxgb4: Use str_plural() in mem_intr_handler() Thorsten Blum
@ 2026-07-06 14:10 ` Potnuri Bharat Teja
  2026-07-10 14:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Potnuri Bharat Teja @ 2026-07-06 14:10 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev@vger.kernel.org, linux-kernel@vger.kernel.org

On Saturday, July 07/04/26, 2026 at 17:40:11 +0530, Thorsten Blum wrote:
> Replace the manual ternary "s" pluralization with str_plural() to
> simplify the code.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---

Thank you.
Reviewed-by: Potnuri Bharat Teja <bharat@chelsio.com>

>  drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
> index 6871127427fa..29d7b786e51e 100644
> --- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
> +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
> @@ -33,6 +33,7 @@
>   */
>  
>  #include <linux/delay.h>
> +#include <linux/string_choices.h>
>  #include "cxgb4.h"
>  #include "t4_regs.h"
>  #include "t4_values.h"
> @@ -4867,7 +4868,7 @@ static void mem_intr_handler(struct adapter *adapter, int idx)
>  		if (printk_ratelimit())
>  			dev_warn(adapter->pdev_dev,
>  				 "%u %s correctable ECC data error%s\n",
> -				 cnt, name[idx], cnt > 1 ? "s" : "");
> +				 cnt, name[idx], str_plural(cnt));
>  	}
>  	if (v & ECC_UE_INT_CAUSE_F)
>  		dev_alert(adapter->pdev_dev,

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: chelsio: cxgb4: Use str_plural() in mem_intr_handler()
  2026-07-04 12:10 [PATCH net-next] net: chelsio: cxgb4: Use str_plural() in mem_intr_handler() Thorsten Blum
  2026-07-06 14:10 ` Potnuri Bharat Teja
@ 2026-07-10 14:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-07-10 14:00 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: bharat, andrew+netdev, davem, edumazet, kuba, pabeni, netdev,
	linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Sat,  4 Jul 2026 14:10:11 +0200 you wrote:
> Replace the manual ternary "s" pluralization with str_plural() to
> simplify the code.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
>  drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Here is the summary with links:
  - [net-next] net: chelsio: cxgb4: Use str_plural() in mem_intr_handler()
    https://git.kernel.org/netdev/net-next/c/d5d7554052f3

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-10 14:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-04 12:10 [PATCH net-next] net: chelsio: cxgb4: Use str_plural() in mem_intr_handler() Thorsten Blum
2026-07-06 14:10 ` Potnuri Bharat Teja
2026-07-10 14:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox