Skip to content

Commit 32261d1

Browse files
ffainellijoergroedel
authored andcommitted
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>
1 parent a4fdd97 commit 32261d1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/iommu/iommu.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,16 +176,16 @@ static int __init iommu_subsys_init(void)
176176
if (!iommu_default_passthrough() && !iommu_dma_strict)
177177
iommu_def_domain_type = IOMMU_DOMAIN_DMA_FQ;
178178

179-
pr_info("Default domain type: %s %s\n",
179+
pr_info("Default domain type: %s%s\n",
180180
iommu_domain_type_str(iommu_def_domain_type),
181181
(iommu_cmd_line & IOMMU_CMD_LINE_DMA_API) ?
182-
"(set via kernel command line)" : "");
182+
" (set via kernel command line)" : "");
183183

184184
if (!iommu_default_passthrough())
185-
pr_info("DMA domain TLB invalidation policy: %s mode %s\n",
185+
pr_info("DMA domain TLB invalidation policy: %s mode%s\n",
186186
iommu_dma_strict ? "strict" : "lazy",
187187
(iommu_cmd_line & IOMMU_CMD_LINE_STRICT) ?
188-
"(set via kernel command line)" : "");
188+
" (set via kernel command line)" : "");
189189

190190
nb = kcalloc(ARRAY_SIZE(iommu_buses), sizeof(*nb), GFP_KERNEL);
191191
if (!nb)

0 commit comments

Comments
 (0)