Skip to content

Commit cd5730f

Browse files
bibo-maoKexyBiscuit
authored andcommitted
FROMGIT: LoongArch: KVM: Remove never called default case statement
IOCSR instruction supports 1/2/4/8 bytes access, len must be 1/2/4/8 bytes from iocsr exit emulation function kvm_emu_iocsr(), remove the default case in switch case statements. Signed-off-by: Bibo Mao <[email protected]> Signed-off-by: Huacai Chen <[email protected]> (cherry picked from commit 9afce1f https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git loongarch-next) Signed-off-by: Kexy Biscuit <[email protected]>
1 parent 4775f24 commit cd5730f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

arch/loongarch/kvm/intc/eiointc.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -333,12 +333,9 @@ static int kvm_eiointc_read(struct kvm_vcpu *vcpu,
333333
case 4:
334334
ret = loongarch_eiointc_readl(vcpu, eiointc, addr, val);
335335
break;
336-
case 8:
336+
default:
337337
ret = loongarch_eiointc_readq(vcpu, eiointc, addr, val);
338338
break;
339-
default:
340-
WARN_ONCE(1, "%s: Abnormal address access: addr 0x%llx, size %d\n",
341-
__func__, addr, len);
342339
}
343340
spin_unlock_irqrestore(&eiointc->lock, flags);
344341

@@ -709,12 +706,9 @@ static int kvm_eiointc_write(struct kvm_vcpu *vcpu,
709706
case 4:
710707
ret = loongarch_eiointc_writel(vcpu, eiointc, addr, val);
711708
break;
712-
case 8:
709+
default:
713710
ret = loongarch_eiointc_writeq(vcpu, eiointc, addr, val);
714711
break;
715-
default:
716-
WARN_ONCE(1, "%s: Abnormal address access: addr 0x%llx, size %d\n",
717-
__func__, addr, len);
718712
}
719713
spin_unlock_irqrestore(&eiointc->lock, flags);
720714

0 commit comments

Comments
 (0)