提交 a46007a0 编写于 作者: J Juan Quintela 提交者: Anthony Liguori

vga and cirrus_vga: substitute switch for equivalent assigntment

Signed-off-by: NJuan Quintela <quintela@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 957c9db5
......@@ -2874,20 +2874,7 @@ static void cirrus_vga_ioport_write(void *opaque, uint32_t addr, uint32_t val)
s->cr[7] = (s->cr[7] & ~0x10) | (val & 0x10);
return;
}
switch (s->cr_index) {
case 0x01: /* horizontal display end */
case 0x07:
case 0x09:
case 0x0c:
case 0x0d:
case 0x12: /* vertical display end */
s->cr[s->cr_index] = val;
break;
default:
s->cr[s->cr_index] = val;
break;
}
s->cr[s->cr_index] = val;
switch(s->cr_index) {
case 0x00:
......
......@@ -488,19 +488,7 @@ void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val)
s->cr[7] = (s->cr[7] & ~0x10) | (val & 0x10);
return;
}
switch(s->cr_index) {
case 0x01: /* horizontal display end */
case 0x07:
case 0x09:
case 0x0c:
case 0x0d:
case 0x12: /* vertical display end */
s->cr[s->cr_index] = val;
break;
default:
s->cr[s->cr_index] = val;
break;
}
s->cr[s->cr_index] = val;
switch(s->cr_index) {
case 0x00:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册