Patchwork [04/10] ide: Don't block-align IDEState member smart_selftest_data

login
register
mail settings
Submitter Markus Armbruster
Date Dec. 17, 2012, 2:05 p.m.
Message ID <1355753160-17544-5-git-send-email-armbru@redhat.com>
Download mbox | patch
Permalink /patch/206883/
State New
Headers show

Comments

Markus Armbruster - Dec. 17, 2012, 2:05 p.m.
All uses are simple array subscripts.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/ide/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch

diff --git a/hw/ide/core.c b/hw/ide/core.c
index 5876862..66e56c2 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -2006,8 +2006,7 @@  static void ide_init1(IDEBus *bus, int unit)
     s->io_buffer = qemu_memalign(2048, s->io_buffer_total_len);
     memset(s->io_buffer, 0, s->io_buffer_total_len);
 
-    s->smart_selftest_data = qemu_blockalign(s->bs, 512);
-    memset(s->smart_selftest_data, 0, 512);
+    s->smart_selftest_data = g_malloc0(512);
 
     s->sector_write_timer = qemu_new_timer_ns(vm_clock,
                                            ide_sector_write_timer_cb, s);