diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-12-10 08:34:29 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-12-10 08:34:29 -0600 |
commit | 7c12fd9b29c6ca2119396f143d84706f2fba6222 (patch) | |
tree | 4aec8a23b6899c8ef34e716b2328f5d443663503 /hw | |
parent | 8385b173a0ca4c2345434104e6cc2a7259adc4b9 (diff) | |
parent | 654598c944aa31cdbea435bd468055af9c918d16 (diff) |
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
* stefanha/trivial-patches:
pc_sysfw: Plug memory leak on pc_fw_add_pflash_drv() error path
qemu-options: Fix space at EOL
Fix spelling in comments and documentation
Clean up pci_drive_hot_add()'s use of BlockInterfaceType
arm: a9mpcore: remove un-used ptimer_iomem field
target-sparc: Remove t0, t1 from CPUSPARCState
target-m68k: Remove t1 from CPUM68KState
target-alpha: Remove t0, t1 from CPUAlphaState
s390x: Spelling fixes (endianess -> endianness, occured -> occurred)
Fix comments (adress -> address, layed -> laid, wierd -> weird)
Fix spelling (prefered -> preferred)
configure: Remove stray debug output
sd: Send debug printfery to stderr not stdout
Conflicts:
configure
Resolve spelling conflict in configure.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/a9mpcore.c | 1 | ||||
-rw-r--r-- | hw/device-hotplug.c | 11 | ||||
-rw-r--r-- | hw/pc_sysfw.c | 4 | ||||
-rw-r--r-- | hw/pci-hotplug.c | 7 | ||||
-rw-r--r-- | hw/s390x/sclp.h | 4 | ||||
-rw-r--r-- | hw/s390x/sclpconsole.c | 4 | ||||
-rw-r--r-- | hw/sd.c | 4 | ||||
-rw-r--r-- | hw/usb.h | 6 |
8 files changed, 19 insertions, 22 deletions
diff --git a/hw/a9mpcore.c b/hw/a9mpcore.c index 824ff0a4de..f802de0824 100644 --- a/hw/a9mpcore.c +++ b/hw/a9mpcore.c @@ -19,7 +19,6 @@ typedef struct a9mp_priv_state { uint32_t old_timer_status[8]; uint32_t num_cpu; MemoryRegion scu_iomem; - MemoryRegion ptimer_iomem; MemoryRegion container; DeviceState *mptimer; DeviceState *gic; diff --git a/hw/device-hotplug.c b/hw/device-hotplug.c index eec0fe3148..6d9c080381 100644 --- a/hw/device-hotplug.c +++ b/hw/device-hotplug.c @@ -49,18 +49,16 @@ DriveInfo *add_init_drive(const char *optstr) } #if !defined(TARGET_I386) -int pci_drive_hot_add(Monitor *mon, const QDict *qdict, - DriveInfo *dinfo, int type) +int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo) { /* On non-x86 we don't do PCI hotplug */ - monitor_printf(mon, "Can't hot-add drive to type %d\n", type); + monitor_printf(mon, "Can't hot-add drive to type %d\n", dinfo->type); return -1; } #endif void drive_hot_add(Monitor *mon, const QDict *qdict) { - int type; DriveInfo *dinfo = NULL; const char *opts = qdict_get_str(qdict, "opts"); @@ -72,14 +70,13 @@ void drive_hot_add(Monitor *mon, const QDict *qdict) monitor_printf(mon, "Parameter addr not supported\n"); goto err; } - type = dinfo->type; - switch (type) { + switch (dinfo->type) { case IF_NONE: monitor_printf(mon, "OK\n"); break; default: - if (pci_drive_hot_add(mon, qdict, dinfo, type)) { + if (pci_drive_hot_add(mon, qdict, dinfo)) { goto err; } } diff --git a/hw/pc_sysfw.c b/hw/pc_sysfw.c index 9d7c5f4003..40bced2322 100644 --- a/hw/pc_sysfw.c +++ b/hw/pc_sysfw.c @@ -98,7 +98,9 @@ static void pc_fw_add_pflash_drv(void) return; } - drive_init(opts, machine->use_scsi); + if (!drive_init(opts, machine->use_scsi)) { + qemu_opts_del(opts); + } } static void pc_system_flash_init(MemoryRegion *rom_memory, diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c index 0ca5546fc6..3bcfdcc1a6 100644 --- a/hw/pci-hotplug.c +++ b/hw/pci-hotplug.c @@ -111,15 +111,14 @@ static int scsi_hot_add(Monitor *mon, DeviceState *adapter, return 0; } -int pci_drive_hot_add(Monitor *mon, const QDict *qdict, - DriveInfo *dinfo, int type) +int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo) { int dom, pci_bus; unsigned slot; PCIDevice *dev; const char *pci_addr = qdict_get_str(qdict, "pci_addr"); - switch (type) { + switch (dinfo->type) { case IF_SCSI: if (pci_read_devaddr(mon, pci_addr, &dom, &pci_bus, &slot)) { goto err; @@ -135,7 +134,7 @@ int pci_drive_hot_add(Monitor *mon, const QDict *qdict, } break; default: - monitor_printf(mon, "Can't hot-add drive to type %d\n", type); + monitor_printf(mon, "Can't hot-add drive to type %d\n", dinfo->type); goto err; } diff --git a/hw/s390x/sclp.h b/hw/s390x/sclp.h index fe89dadd68..231a38aa09 100644 --- a/hw/s390x/sclp.h +++ b/hw/s390x/sclp.h @@ -51,7 +51,7 @@ /* * Normally packed structures are not the right thing to do, since all code - * must take care of endianess. We cant use ldl_phys and friends for two + * must take care of endianness. We cannot use ldl_phys and friends for two * reasons, though: * - some of the embedded structures below the SCCB can appear multiple times * at different locations, so there is no fixed offset @@ -60,7 +60,7 @@ * alter the structure while we parse it. We cannot use ldl_p and friends * either without doing pointer arithmetics * So we have to double check that all users of sclp data structures use the - * right endianess wrappers. + * right endianness wrappers. */ typedef struct SCCBHeader { uint16_t length; diff --git a/hw/s390x/sclpconsole.c b/hw/s390x/sclpconsole.c index 0ec5623f57..fece878e88 100644 --- a/hw/s390x/sclpconsole.c +++ b/hw/s390x/sclpconsole.c @@ -179,8 +179,8 @@ static int read_event_data(SCLPEvent *event, EventBufferHeader *evt_buf_hdr, } /* triggered by SCLP's write_event_data - * - write console data into character layer - * returns < 0 if an error occured + * - write console data to character layer + * returns < 0 if an error occurred */ static ssize_t write_console_data(SCLPEvent *event, const uint8_t *buf, size_t len) @@ -1439,8 +1439,8 @@ send_response: int i; DPRINTF("Response:"); for (i = 0; i < rsplen; i++) - printf(" %02x", response[i]); - printf(" state %d\n", sd->state); + fprintf(stderr, " %02x", response[i]); + fprintf(stderr, " state %d\n", sd->state); } else { DPRINTF("No response %d\n", sd->state); } @@ -284,7 +284,7 @@ typedef struct USBDeviceClass { * Called from handle_packet(). * * Status gets stored in p->status, and if p->status == USB_RET_SUCCESS - * then the number of bytes transfered is stored in p->actual_length + * then the number of bytes transferred is stored in p->actual_length */ void (*handle_control)(USBDevice *dev, USBPacket *p, int request, int value, int index, int length, uint8_t *data); @@ -294,7 +294,7 @@ typedef struct USBDeviceClass { * Called from handle_packet(). * * Status gets stored in p->status, and if p->status == USB_RET_SUCCESS - * then the number of bytes transfered is stored in p->actual_length + * then the number of bytes transferred is stored in p->actual_length */ void (*handle_data)(USBDevice *dev, USBPacket *p); @@ -360,7 +360,7 @@ struct USBPacket { bool short_not_ok; bool int_req; int status; /* USB_RET_* status code */ - int actual_length; /* Number of bytes actually transfered */ + int actual_length; /* Number of bytes actually transferred */ /* Internal use by the USB layer. */ USBPacketState state; USBCombinedPacket *combined; |