Skip to content

Commit e84b7cc

Browse files
LuBaolujoergroedel
authored andcommitted
iommu/amd: Add default branch in amd_iommu_capable()
Recent gcc warns about switching on an enumeration, but not having an explicit case statement for all members of the enumeration. To show the compiler this is intentional, we simply add a default case with nothing more than a break statement. Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 24d2c52 commit e84b7cc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/iommu/amd_iommu.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3083,6 +3083,8 @@ static bool amd_iommu_capable(enum iommu_cap cap)
30833083
return (irq_remapping_enabled == 1);
30843084
case IOMMU_CAP_NOEXEC:
30853085
return false;
3086+
default:
3087+
break;
30863088
}
30873089

30883090
return false;

0 commit comments

Comments
 (0)