Skip to content

Commit

Permalink
iommu/amd: Add default branch in amd_iommu_capable()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
  • Loading branch information
LuBaolu authored and joergroedel committed Oct 8, 2018
1 parent 24d2c52 commit e84b7cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/iommu/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3083,6 +3083,8 @@ static bool amd_iommu_capable(enum iommu_cap cap)
return (irq_remapping_enabled == 1);
case IOMMU_CAP_NOEXEC:
return false;
default:
break;
}

return false;
Expand Down

0 comments on commit e84b7cc

Please sign in to comment.