summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2026-07-04 14:10:11 +0200
committerPaolo Abeni <pabeni@redhat.com>2026-07-10 15:55:22 +0200
commitd5d7554052f3ac45c75d8e526ded2a70a7593929 (patch)
tree73c01b51744d79310d22e02e7a2cf48e75359376 /drivers
parent832255a6df491b6bfa41e6458d097f269b680d77 (diff)
net: chelsio: cxgb4: Use str_plural() in mem_intr_handler()
Replace the manual ternary "s" pluralization with str_plural() to simplify the code. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Potnuri Bharat Teja <bharat@chelsio.com> Link: https://patch.msgid.link/20260704121010.201016-3-thorsten.blum@linux.dev Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/t4_hw.c3
1 files changed, 2 insertions, 1 deletions
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,