summaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2023-05-09 12:10:48 -0700
committerJoerg Roedel <jroedel@suse.de>2023-05-22 17:41:51 +0200
commit32261d10943b7fffa864f9a532e2b40a813df79b (patch)
tree772f73044aa8c13870b6ba8f7f83ccaa5f544d1c /drivers/iommu
parenta4fdd976227240b06ced89b5df88a1a1f388f092 (diff)
downloadlinux-stable-32261d10943b7fffa864f9a532e2b40a813df79b.tar.gz
linux-stable-32261d10943b7fffa864f9a532e2b40a813df79b.tar.bz2
linux-stable-32261d10943b7fffa864f9a532e2b40a813df79b.zip
iommu: Suppress empty whitespaces in prints
If IOMMU_CMD_LINE_DMA_API or IOMMU_CMD_LINE_STRICT are not set in iommu_cmd_line, we will be emitting a whitespace before the newline. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20230509191049.1752259-1-f.fainelli@gmail.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/iommu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 7078bf4a8ec8..10eb24d2e55a 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -176,16 +176,16 @@ static int __init iommu_subsys_init(void)
if (!iommu_default_passthrough() && !iommu_dma_strict)
iommu_def_domain_type = IOMMU_DOMAIN_DMA_FQ;
- pr_info("Default domain type: %s %s\n",
+ pr_info("Default domain type: %s%s\n",
iommu_domain_type_str(iommu_def_domain_type),
(iommu_cmd_line & IOMMU_CMD_LINE_DMA_API) ?
- "(set via kernel command line)" : "");
+ " (set via kernel command line)" : "");
if (!iommu_default_passthrough())
- pr_info("DMA domain TLB invalidation policy: %s mode %s\n",
+ pr_info("DMA domain TLB invalidation policy: %s mode%s\n",
iommu_dma_strict ? "strict" : "lazy",
(iommu_cmd_line & IOMMU_CMD_LINE_STRICT) ?
- "(set via kernel command line)" : "");
+ " (set via kernel command line)" : "");
nb = kcalloc(ARRAY_SIZE(iommu_buses), sizeof(*nb), GFP_KERNEL);
if (!nb)