summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/arm-smmu-v3.c
diff options
context:
space:
mode:
authorAnders Roxell2019-07-30 17:20:11 +0200
committerJoerg Roedel2019-08-06 17:26:38 +0200
commit11f4fe9ba3c85a4efac7ec25e75056a9b612d9da (patch)
treeccfcda1ca54dde4d033f1e98ceda4b2176082a84 /drivers/iommu/arm-smmu-v3.c
parentiommu/dma: Handle MSI mappings separately (diff)
downloadkernel-qcow2-linux-11f4fe9ba3c85a4efac7ec25e75056a9b612d9da.tar.gz
kernel-qcow2-linux-11f4fe9ba3c85a4efac7ec25e75056a9b612d9da.tar.xz
kernel-qcow2-linux-11f4fe9ba3c85a4efac7ec25e75056a9b612d9da.zip
iommu/arm-smmu: Mark expected switch fall-through
Now that -Wimplicit-fallthrough is passed to GCC by default, the following warning shows up: ../drivers/iommu/arm-smmu-v3.c: In function ‘arm_smmu_write_strtab_ent’: ../drivers/iommu/arm-smmu-v3.c:1189:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (disable_bypass) ^ ../drivers/iommu/arm-smmu-v3.c:1191:3: note: here default: ^~~~~~~ Rework so that the compiler doesn't warn about fall-through. Make it clearer by calling 'BUG_ON()' when disable_bypass is set, and always 'break;' Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Acked-by: Will Deacon <will@kernel.org> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/arm-smmu-v3.c')
-rw-r--r--drivers/iommu/arm-smmu-v3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index a9a9fabd3968..c5c93e48b4db 100644
--- a/drivers/iommu/arm-smmu-v3.c
+++ b/drivers/iommu/arm-smmu-v3.c
@@ -1186,8 +1186,8 @@ static void arm_smmu_write_strtab_ent(struct arm_smmu_master *master, u32 sid,
ste_live = true;
break;
case STRTAB_STE_0_CFG_ABORT:
- if (disable_bypass)
- break;
+ BUG_ON(!disable_bypass);
+ break;
default:
BUG(); /* STE corruption */
}