projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f5ae30
)
iommu/amd: use str_plural() to simplify the code
author
Xichao Zhao
<zhao.xichao@vivo.com>
Mon, 18 Aug 2025 07:05:56 +0000
(15:05 +0800)
committer
Joerg Roedel
<joerg.roedel@amd.com>
Fri, 5 Sep 2025 12:25:32 +0000
(14:25 +0200)
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>
drivers/iommu/amd/iommu.c
patch
|
blob
|
history
diff --git
a/drivers/iommu/amd/iommu.c
b/drivers/iommu/amd/iommu.c
index
eb348c6
..
fc11a5d
100644
(file)
--- a/
drivers/iommu/amd/iommu.c
+++ b/
drivers/iommu/amd/iommu.c
@@
-14,6
+14,7
@@
#include <linux/pci-ats.h>
#include <linux/bitmap.h>
#include <linux/slab.h>
+#include <linux/string_choices.h>
#include <linux/debugfs.h>
#include <linux/scatterlist.h>
#include <linux/dma-map-ops.h>
@@
-265,7
+266,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)