Skip to content
  • Anders Roxell's avatar
    iommu/arm-smmu: Mark expected switch fall-through · 11f4fe9b
    Anders Roxell authored
    
    
    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: default avatarAnders Roxell <anders.roxell@linaro.org>
    Acked-by: default avatarWill Deacon <will@kernel.org>
    Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
    11f4fe9b