summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/i8259.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2017-04-07 11:50:40 +0300
committerRadim Krčmář <rkrcmar@redhat.com>2017-04-12 21:17:15 +0300
commitb5e7cf52e102d267646af0ea3dc10a4fd4e51b7d (patch)
tree6a3574e225d5618a8080d3721db5f07756184460 /arch/x86/kvm/i8259.c
parent84a5c79e7048b94100d28f313b00dcbbe457c398 (diff)
downloadlinux-b5e7cf52e102d267646af0ea3dc10a4fd4e51b7d.tar.xz
KVM: x86: simplify pic_ioport_read()
Signed-off-by: David Hildenbrand <david@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Diffstat (limited to 'arch/x86/kvm/i8259.c')
-rw-r--r--arch/x86/kvm/i8259.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c
index d481f3346eb5..bdcd4139eca9 100644
--- a/arch/x86/kvm/i8259.c
+++ b/arch/x86/kvm/i8259.c
@@ -417,19 +417,16 @@ static u32 pic_poll_read(struct kvm_kpic_state *s, u32 addr1)
return ret;
}
-static u32 pic_ioport_read(void *opaque, u32 addr1)
+static u32 pic_ioport_read(void *opaque, u32 addr)
{
struct kvm_kpic_state *s = opaque;
- unsigned int addr;
int ret;
- addr = addr1;
- addr &= 1;
if (s->poll) {
- ret = pic_poll_read(s, addr1);
+ ret = pic_poll_read(s, addr);
s->poll = 0;
} else
- if (addr == 0)
+ if ((addr & 1) == 0)
if (s->read_reg_select)
ret = s->isr;
else