aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/amd_iommu.c
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2014-10-27 07:24:48 -0400
committerWill Deacon <will.deacon@arm.com>2014-11-14 09:41:39 -0500
commitcfdeec22e459e3c5081c8fc6d956c8ee68943397 (patch)
tree710f83d998dcf2ddfad6eaf7559e7398760d3f65 /drivers/iommu/amd_iommu.c
parent0029a8dd6c807e04b119ec9416510d30936f45e6 (diff)
iommu/amd: remove compiler warning due to IOMMU_CAP_NOEXEC
Some versions of GCC get unduly upset when confronted with a switch that doesn't explicitly handle all cases of an enum, despite having an implicit default case following the actualy switch statement: drivers/iommu/amd_iommu.c: In function 'amd_iommu_capable': >> drivers/iommu/amd_iommu.c:3409:2: warning: enumeration value 'IOMMU_CAP_NOEXEC' not handled in switch [-Wswitch] switch (cap) { This patch adds a case for IOMMU_CAP_NOEXEC to the amd IOMMU driver to remove this warning. Cc: Joerg Roedel <jroedel@suse.de> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'drivers/iommu/amd_iommu.c')
-rw-r--r--drivers/iommu/amd_iommu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 505a9adac2d5..3d78a8fb5a6a 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -3411,6 +3411,8 @@ static bool amd_iommu_capable(enum iommu_cap cap)
3411 return true; 3411 return true;
3412 case IOMMU_CAP_INTR_REMAP: 3412 case IOMMU_CAP_INTR_REMAP:
3413 return (irq_remapping_enabled == 1); 3413 return (irq_remapping_enabled == 1);
3414 case IOMMU_CAP_NOEXEC:
3415 return false;
3414 } 3416 }
3415 3417
3416 return false; 3418 return false;