Skip to content

Commit d3d3b60

Browse files
Xichao Zhaojoergroedel
authored andcommitted
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@vivo.com> Reviewed-by: Ankit Soni <Ankit.Soni@amd.com> Link: https://lore.kernel.org/r/20250818070556.458271-1-zhao.xichao@vivo.com Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
1 parent 8f5ae30 commit d3d3b60

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/iommu/amd/iommu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/pci-ats.h>
1515
#include <linux/bitmap.h>
1616
#include <linux/slab.h>
17+
#include <linux/string_choices.h>
1718
#include <linux/debugfs.h>
1819
#include <linux/scatterlist.h>
1920
#include <linux/dma-map-ops.h>
@@ -265,7 +266,7 @@ static inline int get_acpihid_device_id(struct device *dev,
265266
return -EINVAL;
266267
if (fw_bug)
267268
dev_err_once(dev, FW_BUG "No ACPI device matched UID, but %d device%s matched HID.\n",
268-
hid_count, hid_count > 1 ? "s" : "");
269+
hid_count, str_plural(hid_count));
269270
if (hid_count > 1)
270271
return -EINVAL;
271272
if (entry)

0 commit comments

Comments
 (0)