Skip to contentSkip to conversation

iommu/amd: Remove unnecessary break statements

PATCH New leixiang 1 participant 1 message Apr 25, 2025

Subsystems (2)
lore
Share & tools
lore

leixiang

author
#0 lore raw

PATCH 1/1 iommu/amd: Remove unnecessary break statements

From f7ff3298d05479f34463b409e1cbcec396621b71 Mon Sep 17 00:00:00 2001
From: leixiang <[email protected]>
Date: Fri, 25 Apr 2025 12:18:42 +0800
Subject: [PATCH] iommu/amd: Remove unnecessary break statements

As CMPXCHG16B feature has already been checked separately before enabling the GA, XT, and GAM modes, there is unnecessary need a break in init_iommu_one at case 0x40.

Fixes e52d58d54a321 ("iommu/amd: Use cmpxchg_double() when updating 128-bit IRTE")
---
 drivers/iommu/amd/init.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/iommu/amd/init.c +1 -3
index dd9e26b7b718..5fb5a4d7c142 100644
@@ -1790,10 +1790,8 @@ static int __init init_iommu_one(struct amd_iommu *iommu, struct ivhd_header *h,
 			iommu->mmio_phys_end = MMIO_CNTR_CONF_OFFSET;
 
 		/* XT and GAM require GA mode. */
-		if ((h->efr_reg & (0x1 << IOMMU_EFR_GASUP_SHIFT)) == 0) {
+		if ((h->efr_reg & (0x1 << IOMMU_EFR_GASUP_SHIFT)) == 0)
 			amd_iommu_guest_ir = AMD_IOMMU_GUEST_IR_LEGACY;
-			break;
-		}
 
 		if (h->efr_reg & BIT(IOMMU_EFR_XTSUP_SHIFT))
 			amd_iommu_xt_mode = IRQ_REMAP_X2APIC_MODE;
Signature · 1 line
2.43.0