From d8ee2591e495d5feb0e0250866222dedc805c8d8 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Tue, 5 Nov 2013 16:38:34 +0000 Subject: bswap.h: Remove cpu_to_be16wu() Replace the legacy cpu_to_be16wu() with stw_be_p(). Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Michael S. Tsirkin Message-id: 1383669517-25598-7-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori --- hw/ide/atapi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'hw/ide') diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 05e60b1cd..f7d2009c0 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -437,7 +437,7 @@ static int ide_dvd_read_structure(IDEState *s, int format, cpu_to_ube32(buf + 16, total_sectors - 1); /* l0 end sector */ /* Size of buffer, not including 2 byte size field */ - cpu_to_be16wu((uint16_t *)buf, 2048 + 2); + stw_be_p(buf, 2048 + 2); /* 2k data + 4 byte header */ return (2048 + 4); @@ -448,7 +448,7 @@ static int ide_dvd_read_structure(IDEState *s, int format, buf[5] = 0; /* no region restrictions */ /* Size of buffer, not including 2 byte size field */ - cpu_to_be16wu((uint16_t *)buf, 4 + 2); + stw_be_p(buf, 4 + 2); /* 4 byte header + 4 byte data */ return (4 + 4); @@ -458,7 +458,7 @@ static int ide_dvd_read_structure(IDEState *s, int format, case 0x04: /* DVD disc manufacturing information */ /* Size of buffer, not including 2 byte size field */ - cpu_to_be16wu((uint16_t *)buf, 2048 + 2); + stw_be_p(buf, 2048 + 2); /* 2k data + 4 byte header */ return (2048 + 4); @@ -471,22 +471,22 @@ static int ide_dvd_read_structure(IDEState *s, int format, buf[4] = 0x00; /* Physical format */ buf[5] = 0x40; /* Not writable, is readable */ - cpu_to_be16wu((uint16_t *)(buf + 6), 2048 + 4); + stw_be_p(buf + 6, 2048 + 4); buf[8] = 0x01; /* Copyright info */ buf[9] = 0x40; /* Not writable, is readable */ - cpu_to_be16wu((uint16_t *)(buf + 10), 4 + 4); + stw_be_p(buf + 10, 4 + 4); buf[12] = 0x03; /* BCA info */ buf[13] = 0x40; /* Not writable, is readable */ - cpu_to_be16wu((uint16_t *)(buf + 14), 188 + 4); + stw_be_p(buf + 14, 188 + 4); buf[16] = 0x04; /* Manufacturing info */ buf[17] = 0x40; /* Not writable, is readable */ - cpu_to_be16wu((uint16_t *)(buf + 18), 2048 + 4); + stw_be_p(buf + 18, 2048 + 4); /* Size of buffer, not including 2 byte size field */ - cpu_to_be16wu((uint16_t *)buf, 16 + 2); + stw_be_p(buf, 16 + 2); /* data written + 4 byte header */ return (16 + 4); -- cgit v1.2.3