Patchwork [1/2] ide: Use some already defined page macros instead of constants

login
register
mail settings
Submitter Thadeu Lima de Souza Cascardo
Date Nov. 30, 2009, 7:36 p.m.
Message ID <1259609814-16224-1-git-send-email-cascardo@holoscopio.com>
Download mbox | patch
Permalink /patch/39861/
State New
Headers show

Comments

Thadeu Lima de Souza Cascardo - Nov. 30, 2009, 7:36 p.m.
Some PAGE constants were used instead of the macros we already have
defined in internal.h.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
---
 hw/ide/core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/hw/ide/core.c b/hw/ide/core.c
index 7b1ff8f..b551adf 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -1236,7 +1236,7 @@  static void ide_atapi_cmd(IDEState *s)
             switch(action) {
             case 0: /* current values */
                 switch(code) {
-                case 0x01: /* error recovery */
+                case GPMODE_R_W_ERROR_PAGE: /* error recovery */
                     cpu_to_ube16(&buf[0], 16 + 6);
                     buf[2] = 0x70;
                     buf[3] = 0;
@@ -1255,7 +1255,7 @@  static void ide_atapi_cmd(IDEState *s)
                     buf[15] = 0x00;
                     ide_atapi_cmd_reply(s, 16, max_len);
                     break;
-                case 0x2a:
+                case GPMODE_CAPABILITIES_PAGE:
                     cpu_to_ube16(&buf[0], 28 + 6);
                     buf[2] = 0x70;
                     buf[3] = 0;