Commit d3d3b604 authored by Xichao Zhao's avatar Xichao Zhao Committed by Joerg Roedel
Browse files

iommu/amd: use str_plural() to simplify the code



Use the string choice helper function str_plural() to simplify the code.

Signed-off-by: default avatarXichao Zhao <zhao.xichao@vivo.com>
Reviewed-by: default avatarAnkit Soni <Ankit.Soni@amd.com>
Link: https://lore.kernel.org/r/20250818070556.458271-1-zhao.xichao@vivo.com


Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent 8f5ae30d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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)