path: root/arch/arm64/kvm/hyp/s2-setup.c
diff options
authorWill Deacon <>2016-04-01 12:12:22 +0100
committerChristoffer Dall <>2016-04-01 13:30:55 +0200
commit7d4bd1d2819ef1035ba1ed648358df37b51ade6f (patch)
tree5f1e19ef3ca52b235b7919401f08d07fcfe7d90e /arch/arm64/kvm/hyp/s2-setup.c
parent5f5560b1c5f3a80e91c6babb2da34a51943bbdec (diff)
arm64: KVM: Add braces to multi-line if statement in virtual PMU code
The kernel is written in C, not python, so we need braces around multi-line if statements. GCC 6 actually warns about this, thanks to the fantastic new "-Wmisleading-indentation" flag: | virt/kvm/arm/pmu.c: In function ‘kvm_pmu_overflow_status’: | virt/kvm/arm/pmu.c:198:3: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] | reg &= vcpu_sys_reg(vcpu, PMCNTENSET_EL0); | ^~~ | arch/arm64/kvm/../../../virt/kvm/arm/pmu.c:196:2: note: ...this ‘if’ clause, but it is not | if ((vcpu_sys_reg(vcpu, PMCR_EL0) & ARMV8_PMU_PMCR_E)) | ^~ As it turns out, this particular case is harmless (we just do some &= operations with 0), but worth fixing nonetheless. Signed-off-by: Will Deacon <> Signed-off-by: Christoffer Dall <>
Diffstat (limited to 'arch/arm64/kvm/hyp/s2-setup.c')
0 files changed, 0 insertions, 0 deletions