From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-187.mta1.migadu.com (out-187.mta1.migadu.com [95.215.58.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0ACFC3A9619 for ; Sat, 4 Jul 2026 12:11:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783167085; cv=none; b=UYwbkkKajoXG3czkgAaNCdV5P5v8d11E5gBM9SIs+NYKNcAIKvq7i+BY8JPAyGs4q22H0fP3r4BLqqEeIce/Bif2kfFAme2Xax9fnXNV89cor2LxC3KGX8VVKlo7S1yk+z2MjMcrY8i/c9V0Mi5r/oC/6YhR2ckzypoX5F2D2Sk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783167085; c=relaxed/simple; bh=I0ArMeGYCV7eBZ+H0eMzetwYIqVs237Hckjn6vEC4gw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ridYaH3dCo+Gd5XA41yCApIjPKdRwtKuTwuDE5EjunHaTpOP9hq2V/G9hZrIfBKNNIpdkKwYQl45GC72rXoLrZitvu1NASr6b3GFaOgyXG7Hks+uA5++55L3lXcfOBj+sOrJeXbS0f7wZJM4UhzNpC4Q+HbFWxWvi9O/+bJMDb0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=b5qkeUAU; arc=none smtp.client-ip=95.215.58.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="b5qkeUAU" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1783167070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=59W4E6bQ83pCRNjQa4BY31cifN2ilfN3ElfL7uzJsQw=; b=b5qkeUAU+x4/o24mimYPXtMOxzeX9vnC2QI84dYe5i0EKBzi1BwLAbftjjdrlUpR2vKFq9 ng2sImo3PgaZr/JKXOKP/lC18XtR+docEGvoHk5UabsLh+OKCRHuctEj/ALt9vW8+4BAFi hnHnT0nhh9plwbn2UQ/83r+EfwbO6yw= From: Thorsten Blum To: Potnuri Bharat Teja , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Thorsten Blum , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next] net: chelsio: cxgb4: Use str_plural() in mem_intr_handler() Date: Sat, 4 Jul 2026 14:10:11 +0200 Message-ID: <20260704121010.201016-3-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1005; i=thorsten.blum@linux.dev; h=from:subject; bh=I0ArMeGYCV7eBZ+H0eMzetwYIqVs237Hckjn6vEC4gw=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDFkeP5TiF036YuX8RzEgpT4p1jPOS+PJKzbui/NvdlTnT TpwN/BjRykLgxgXg6yYIsuDWT9m+JbWVG4yidgJM4eVCWQIAxenAEzk1w6G//nSGu+urGa4vihq xnWDO9l7rzrrKPmsaejao2WeYbXhiy0jw0o9mcz6GzkJvLWGwVmVR40VL53Sun64QPPLnIWVb9T PMQMA X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Replace the manual ternary "s" pluralization with str_plural() to simplify the code. Signed-off-by: Thorsten Blum --- 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 +#include #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,