lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 18 Jun 2024 15:44:26 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: john.g.garry@...cle.com
Cc: yanaijie@...wei.com,
	James.Bottomley@...senPartnership.com,
	martin.petersen@...cle.com,
	linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
	Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH] scsi: libsas: Use str_plural() in _sas_resume_ha()

Use existing str_plural() function rather than duplicating its
implementation.

./drivers/scsi/libsas/sas_init.c:426:7-8: opportunity for str_plural(i).

Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9351
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
 drivers/scsi/libsas/sas_init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/libsas/sas_init.c b/drivers/scsi/libsas/sas_init.c
index 9c8cc723170d..67017c03d4da 100644
--- a/drivers/scsi/libsas/sas_init.c
+++ b/drivers/scsi/libsas/sas_init.c
@@ -422,8 +422,8 @@ static void _sas_resume_ha(struct sas_ha_struct *ha, bool drain)
 	 */
 	i = phys_suspended(ha);
 	if (i)
-		dev_info(ha->dev, "waiting up to 25 seconds for %d phy%s to resume\n",
-			 i, i > 1 ? "s" : "");
+		dev_info(ha->dev, "waiting up to 25 seconds for %d phy%s to resume\n", i,
+			 str_plural(i));
 	wait_event_timeout(ha->eh_wait_q, phys_suspended(ha) == 0, tmo);
 	for (i = 0; i < ha->num_phys; i++) {
 		struct asd_sas_phy *phy = ha->sas_phy[i];
-- 
2.20.1.7.g153144c


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ