Skip to content

Commit 765da7f

Browse files
Like Xusean-jc
authored andcommitted
KVM: x86: Remove break statements that will never be executed
Fix compiler warnings when compiling KVM with [-Wunreachable-code-break]. No functional change intended. Cc: Vitaly Kuznetsov <[email protected]> Signed-off-by: Like Xu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent 223f93d commit 765da7f

File tree

3 files changed

+0
-4
lines changed

3 files changed

+0
-4
lines changed

arch/x86/kvm/emulate.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,13 +1799,11 @@ static int writeback(struct x86_emulate_ctxt *ctxt, struct operand *op)
17991799
op->addr.mem,
18001800
&op->val,
18011801
op->bytes);
1802-
break;
18031802
case OP_MEM_STR:
18041803
return segmented_write(ctxt,
18051804
op->addr.mem,
18061805
op->data,
18071806
op->bytes * op->count);
1808-
break;
18091807
case OP_XMM:
18101808
kvm_write_sse_reg(op->addr.xmm, &op->vec_val);
18111809
break;

arch/x86/kvm/hyperv.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,6 @@ static bool hv_check_msr_access(struct kvm_vcpu_hv *hv_vcpu, u32 msr)
12931293
case HV_X64_MSR_VP_ASSIST_PAGE:
12941294
return hv_vcpu->cpuid_cache.features_eax &
12951295
HV_MSR_APIC_ACCESS_AVAILABLE;
1296-
break;
12971296
case HV_X64_MSR_TSC_FREQUENCY:
12981297
case HV_X64_MSR_APIC_FREQUENCY:
12991298
return hv_vcpu->cpuid_cache.features_eax &

arch/x86/kvm/x86.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4646,7 +4646,6 @@ static int kvm_x86_dev_get_attr(struct kvm_device_attr *attr)
46464646
return 0;
46474647
default:
46484648
return -ENXIO;
4649-
break;
46504649
}
46514650
}
46524651

0 commit comments

Comments
 (0)