[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250818035331.393560-1-zhao.xichao@vivo.com>
Date: Mon, 18 Aug 2025 11:53:31 +0800
From: Xichao Zhao <zhao.xichao@...o.com>
To: joro@...tes.org,
will@...nel.org
Cc: suravee.suthikulpanit@....com,
robin.murphy@....com,
iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Xichao Zhao <zhao.xichao@...o.com>
Subject: [PATCH] iommu/amd: use str_plural() to simplify the code
Use the string choice helper function str_plural() to simplify the code.
Signed-off-by: Xichao Zhao <zhao.xichao@...o.com>
---
drivers/iommu/amd/iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
index eb348c63a8d0..b5c829f89544 100644
--- a/drivers/iommu/amd/iommu.c
+++ b/drivers/iommu/amd/iommu.c
@@ -265,7 +265,7 @@ static inline int get_acpihid_device_id(struct device *dev,
return -EINVAL;
if (fw_bug)
dev_err_once(dev, FW_BUG "No ACPI device matched UID, but %d device%s matched HID.\n",
- hid_count, hid_count > 1 ? "s" : "");
+ hid_count, str_plural(hid_count));
if (hid_count > 1)
return -EINVAL;
if (entry)
--
2.34.1
Powered by blists - more mailing lists