From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
To: john.g.garry@oracle.com
Cc: yanaijie@huawei.com, James.Bottomley@HansenPartnership.com,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org,
Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
Abaci Robot <abaci@linux.alibaba.com>
Subject: [PATCH] scsi: libsas: Use str_plural() in _sas_resume_ha()
Date: Tue, 18 Jun 2024 15:44:26 +0800 [thread overview]
Message-ID: <20240618074426.97217-1-jiapeng.chong@linux.alibaba.com> (raw)
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@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9351
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.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
next reply other threads:[~2024-06-18 7:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 7:44 Jiapeng Chong [this message]
2024-06-18 9:33 ` John Garry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240618074426.97217-1-jiapeng.chong@linux.alibaba.com \
--to=jiapeng.chong@linux.alibaba.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=abaci@linux.alibaba.com \
--cc=john.g.garry@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=yanaijie@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®