Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-03-19' into staging

trivial patches for 2015-03-19

# gpg: Signature made Thu Mar 19 08:57:54 2015 GMT using RSA key ID A4C3D7DB
# gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
# gpg:                 aka "Michael Tokarev <mjt@corpit.ru>"
# gpg:                 aka "Michael Tokarev <mjt@debian.org>"

* remotes/mjt/tags/pull-trivial-patches-2015-03-19: (24 commits)
  qga/commands-posix: Fix resource leak
  elf-loader: Add missing error handling for call of lseek
  elf-loader: Fix truncation warning from coverity
  hmp: Fix texinfo documentation
  Fix typos in comments
  qtest/ahci: Fix a bit mask expression
  vl: fix resource leak with monitor_fdset_add_fd
  smbios: add max speed comdline option for type-17 (meory device) structure
  pc-dimm: Add description for device list.
  configure: enable kvm on x32
  error: Replace error_report() & error_free() with error_report_err()
  arm: fix memory leak
  qmp: Drop unused .user_print from command definitions
  hmp: Fix definition of command quit
  target-moxie: Fix warnings from Sparse (one-bit signed bitfield)
  block/qapi: Fix Sparse warning
  Fix remaining warnings from Sparse (void return)
  qom: Fix warning from Sparse
  target-mips: Fix warning from Sparse
  arm/nseries: Fix warnings from Sparse
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell
2015-03-19 14:10:20 +00:00
52 changed files with 191 additions and 161 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ void tpm_backend_destroy(TPMBackend *s)
{
TPMBackendClass *k = TPM_BACKEND_GET_CLASS(s);
return k->ops->destroy(s);
k->ops->destroy(s);
}
int tpm_backend_init(TPMBackend *s, TPMState *state,
+1 -1
View File
@@ -414,7 +414,7 @@ BlockStatsList *qmp_query_blockstats(bool has_query_nodes,
static char *get_human_readable_size(char *buf, int buf_size, int64_t size)
{
static const char suffixes[NB_SUFFIXES] = "KMGT";
static const char suffixes[NB_SUFFIXES] = {'K', 'M', 'G', 'T'};
int64_t base;
int i;
Vendored
+3 -1
View File
@@ -5268,7 +5268,9 @@ case "$target_name" in
\( "$target_name" = "ppcemb" -a "$cpu" = "ppc64" \) -o \
\( "$target_name" = "mipsel" -a "$cpu" = "mips" \) -o \
\( "$target_name" = "x86_64" -a "$cpu" = "i386" \) -o \
\( "$target_name" = "i386" -a "$cpu" = "x86_64" \) \) ; then
\( "$target_name" = "i386" -a "$cpu" = "x86_64" \) -o \
\( "$target_name" = "x86_64" -a "$cpu" = "x32" \) -o \
\( "$target_name" = "i386" -a "$cpu" = "x32" \) \) ; then
echo "CONFIG_KVM=y" >> $config_target_mak
if test "$vhost_net" = "yes" ; then
echo "CONFIG_VHOST_NET=y" >> $config_target_mak
+1 -12
View File
@@ -1210,21 +1210,10 @@ cris_cc_strings[] =
"le",
"a",
/* This is a placeholder. In v0, this would be "ext". In v32, this
is "sb". See cris_conds15. */
is "sb". */
"wf"
};
/* Different names and semantics for condition 1111 (0xf). */
const struct cris_cond15 cris_cond15s[] =
{
/* FIXME: In what version did condition "ext" disappear? */
{"ext", cris_ver_v0_3},
{"wf", cris_ver_v10},
{"sb", cris_ver_v32p},
{NULL, 0}
};
/*
* Local variables:
* eval: (c-set-style "gnu")
+1 -1
View File
@@ -117,7 +117,7 @@ error:
static int init_capabilities(void)
{
/* helper needs following capbabilities only */
/* helper needs following capabilities only */
cap_value_t cap_list[] = {
CAP_CHOWN,
CAP_DAC_OVERRIDE,
+15 -27
View File
@@ -47,7 +47,6 @@ ETEXI
.args_type = "",
.params = "",
.help = "quit the emulator",
.user_print = monitor_user_noop,
.mhandler.cmd = hmp_quit,
},
@@ -205,7 +204,6 @@ ETEXI
STEXI
@item change @var{device} @var{setting}
@findex change
Change the configuration of a device.
@table @option
@@ -523,7 +521,6 @@ ETEXI
STEXI
@item p or print/@var{fmt} @var{expr}
@findex print
Print expression value. Only the @var{format} part of @var{fmt} is
used.
ETEXI
@@ -537,6 +534,8 @@ ETEXI
},
STEXI
@item i/@var{fmt} @var{addr} [.@var{index}]
@findex i
Read I/O port.
ETEXI
@@ -549,6 +548,8 @@ ETEXI
},
STEXI
@item o/@var{fmt} @var{addr} @var{val}
@findex o
Write to I/O port.
ETEXI
@@ -564,7 +565,6 @@ ETEXI
STEXI
@item sendkey @var{keys}
@findex sendkey
Send @var{keys} to the guest. @var{keys} could be the name of the
key or the raw value in hexadecimal format. Use @code{-} to press
several keys simultaneously. Example:
@@ -587,7 +587,6 @@ ETEXI
STEXI
@item system_reset
@findex system_reset
Reset the system.
ETEXI
@@ -602,7 +601,6 @@ ETEXI
STEXI
@item system_powerdown
@findex system_powerdown
Power down the system (if supported).
ETEXI
@@ -617,7 +615,6 @@ ETEXI
STEXI
@item sum @var{addr} @var{size}
@findex sum
Compute the checksum of a memory region.
ETEXI
@@ -632,7 +629,6 @@ ETEXI
STEXI
@item usb_add @var{devname}
@findex usb_add
Add the USB device @var{devname}. For details of available devices see
@ref{usb_devices}
ETEXI
@@ -648,7 +644,6 @@ ETEXI
STEXI
@item usb_del @var{devname}
@findex usb_del
Remove the USB device @var{devname} from the QEMU virtual USB
hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
command @code{info usb} to see the devices you can remove.
@@ -667,7 +662,6 @@ ETEXI
STEXI
@item device_add @var{config}
@findex device_add
Add device.
ETEXI
@@ -683,7 +677,6 @@ ETEXI
STEXI
@item device_del @var{id}
@findex device_del
Remove device @var{id}.
ETEXI
@@ -824,7 +817,6 @@ ETEXI
STEXI
@item boot_set @var{bootdevicelist}
@findex boot_set
Define new values for the boot device list. Those values will override
the values specified on the command line through the @code{-boot} option.
@@ -1539,9 +1531,9 @@ ETEXI
},
STEXI
@item block_set_io_throttle @var{device} @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}
@findex block_set_io_throttle
Change I/O throttle limits for a block drive to @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}
@item block_passwd @var{device} @var{password}
@findex block_passwd
Set the encrypted device @var{device} password to @var{password}
ETEXI
{
@@ -1553,9 +1545,9 @@ ETEXI
},
STEXI
@item block_passwd @var{device} @var{password}
@findex block_passwd
Set the encrypted device @var{device} password to @var{password}
@item block_set_io_throttle @var{device} @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}
@findex block_set_io_throttle
Change I/O throttle limits for a block drive to @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}
ETEXI
{
@@ -1569,7 +1561,6 @@ ETEXI
STEXI
@item set_password [ vnc | spice ] password [ action-if-connected ]
@findex set_password
Change spice/vnc password. Use zero to make the password stay valid
forever. @var{action-if-connected} specifies what should happen in
case a connection is established: @var{fail} makes the password change
@@ -1589,7 +1580,6 @@ ETEXI
STEXI
@item expire_password [ vnc | spice ] expire-time
@findex expire_password
Specify when a password for spice/vnc becomes
invalid. @var{expire-time} accepts:
@@ -1620,9 +1610,8 @@ ETEXI
},
STEXI
@item chardev_add args
@findex chardev_add
@item chardev-add args
@findex chardev-add
chardev_add accepts the same parameters as the -chardev command line switch.
ETEXI
@@ -1637,9 +1626,8 @@ ETEXI
},
STEXI
@item chardev_remove id
@findex chardev_remove
@item chardev-remove id
@findex chardev-remove
Removes the chardev @var{id}.
ETEXI
@@ -1655,7 +1643,6 @@ ETEXI
STEXI
@item qemu-io @var{device} @var{command}
@findex qemu-io
Executes a qemu-io command on the given block device.
ETEXI
@@ -1670,6 +1657,7 @@ ETEXI
STEXI
@item cpu-add @var{id}
@findex cpu-add
Add CPU with id @var{id}
ETEXI
+2 -2
View File
@@ -140,7 +140,7 @@ static int handle_opendir(FsContext *ctx,
static void handle_rewinddir(FsContext *ctx, V9fsFidOpenState *fs)
{
return rewinddir(fs->dir);
rewinddir(fs->dir);
}
static off_t handle_telldir(FsContext *ctx, V9fsFidOpenState *fs)
@@ -157,7 +157,7 @@ static int handle_readdir_r(FsContext *ctx, V9fsFidOpenState *fs,
static void handle_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off)
{
return seekdir(fs->dir, off);
seekdir(fs->dir, off);
}
static ssize_t handle_preadv(FsContext *ctx, V9fsFidOpenState *fs,
+2 -2
View File
@@ -378,7 +378,7 @@ static int local_opendir(FsContext *ctx,
static void local_rewinddir(FsContext *ctx, V9fsFidOpenState *fs)
{
return rewinddir(fs->dir);
rewinddir(fs->dir);
}
static off_t local_telldir(FsContext *ctx, V9fsFidOpenState *fs)
@@ -409,7 +409,7 @@ again:
static void local_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off)
{
return seekdir(fs->dir, off);
seekdir(fs->dir, off);
}
static ssize_t local_preadv(FsContext *ctx, V9fsFidOpenState *fs,
+2 -2
View File
@@ -669,7 +669,7 @@ static int proxy_opendir(FsContext *ctx,
static void proxy_rewinddir(FsContext *ctx, V9fsFidOpenState *fs)
{
return rewinddir(fs->dir);
rewinddir(fs->dir);
}
static off_t proxy_telldir(FsContext *ctx, V9fsFidOpenState *fs)
@@ -686,7 +686,7 @@ static int proxy_readdir_r(FsContext *ctx, V9fsFidOpenState *fs,
static void proxy_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off)
{
return seekdir(fs->dir, off);
seekdir(fs->dir, off);
}
static ssize_t proxy_preadv(FsContext *ctx, V9fsFidOpenState *fs,
+2 -1
View File
@@ -1950,7 +1950,8 @@ static void v9fs_write(void *opaque)
err = pdu_unmarshal(pdu, offset, "dqd", &fid, &off, &count);
if (err < 0) {
return complete_pdu(s, pdu, err);
complete_pdu(s, pdu, err);
return;
}
offset += err;
v9fs_init_qiov_from_pdu(&qiov_full, pdu, offset, count, true);
+1
View File
@@ -113,6 +113,7 @@ static void digic_load_rom(DigicBoardState *s, hwaddr addr,
error_report("Couldn't load rom image '%s'.", filename);
exit(1);
}
g_free(fn);
}
}
+1
View File
@@ -282,6 +282,7 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id)
if (load_image_targphys("sysram.bin", 0xfff88000, filesize) < 0) {
hw_error("Unable to load %s\n", bios_name);
}
g_free(sysboot_filename);
} else {
hw_error("Unable to find %s\n", bios_name);
}
+2 -2
View File
@@ -1403,12 +1403,12 @@ static struct arm_boot_info n810_binfo = {
static void n800_init(MachineState *machine)
{
return n8x0_init(machine, &n800_binfo, 800);
n8x0_init(machine, &n800_binfo, 800);
}
static void n810_init(MachineState *machine)
{
return n8x0_init(machine, &n810_binfo, 810);
n8x0_init(machine, &n810_binfo, 810);
}
static QEMUMachine n800_machine = {
+44 -21
View File
@@ -207,7 +207,8 @@ static void omap_mpu_timer_write(void *opaque, hwaddr addr,
struct omap_mpu_timer_s *s = (struct omap_mpu_timer_s *) opaque;
if (size != 4) {
return omap_badwidth_write32(opaque, addr, value);
omap_badwidth_write32(opaque, addr, value);
return;
}
switch (addr) {
@@ -314,7 +315,8 @@ static void omap_wd_timer_write(void *opaque, hwaddr addr,
struct omap_watchdog_timer_s *s = (struct omap_watchdog_timer_s *) opaque;
if (size != 2) {
return omap_badwidth_write16(opaque, addr, value);
omap_badwidth_write16(opaque, addr, value);
return;
}
switch (addr) {
@@ -440,7 +442,8 @@ static void omap_os_timer_write(void *opaque, hwaddr addr,
int offset = addr & OMAP_MPUI_REG_MASK;
if (size != 4) {
return omap_badwidth_write32(opaque, addr, value);
omap_badwidth_write32(opaque, addr, value);
return;
}
switch (offset) {
@@ -585,7 +588,8 @@ static void omap_ulpd_pm_write(void *opaque, hwaddr addr,
uint16_t diff;
if (size != 2) {
return omap_badwidth_write16(opaque, addr, value);
omap_badwidth_write16(opaque, addr, value);
return;
}
switch (addr) {
@@ -857,7 +861,8 @@ static void omap_pin_cfg_write(void *opaque, hwaddr addr,
uint32_t diff;
if (size != 4) {
return omap_badwidth_write32(opaque, addr, value);
omap_badwidth_write32(opaque, addr, value);
return;
}
switch (addr) {
@@ -1012,7 +1017,8 @@ static void omap_id_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
if (size != 4) {
return omap_badwidth_write32(opaque, addr, value);
omap_badwidth_write32(opaque, addr, value);
return;
}
OMAP_BAD_REG(addr);
@@ -1081,7 +1087,8 @@ static void omap_mpui_write(void *opaque, hwaddr addr,
struct omap_mpu_state_s *s = (struct omap_mpu_state_s *) opaque;
if (size != 4) {
return omap_badwidth_write32(opaque, addr, value);
omap_badwidth_write32(opaque, addr, value);
return;
}
switch (addr) {
@@ -1175,7 +1182,8 @@ static void omap_tipb_bridge_write(void *opaque, hwaddr addr,
struct omap_tipb_bridge_s *s = (struct omap_tipb_bridge_s *) opaque;
if (size < 2) {
return omap_badwidth_write16(opaque, addr, value);
omap_badwidth_write16(opaque, addr, value);
return;
}
switch (addr) {
@@ -1284,7 +1292,8 @@ static void omap_tcmi_write(void *opaque, hwaddr addr,
struct omap_mpu_state_s *s = (struct omap_mpu_state_s *) opaque;
if (size != 4) {
return omap_badwidth_write32(opaque, addr, value);
omap_badwidth_write32(opaque, addr, value);
return;
}
switch (addr) {
@@ -1379,7 +1388,8 @@ static void omap_dpll_write(void *opaque, hwaddr addr,
int div, mult;
if (size != 2) {
return omap_badwidth_write16(opaque, addr, value);
omap_badwidth_write16(opaque, addr, value);
return;
}
if (addr == 0x00) { /* CTL_REG */
@@ -1647,7 +1657,8 @@ static void omap_clkm_write(void *opaque, hwaddr addr,
};
if (size != 2) {
return omap_badwidth_write16(opaque, addr, value);
omap_badwidth_write16(opaque, addr, value);
return;
}
switch (addr) {
@@ -1775,7 +1786,8 @@ static void omap_clkdsp_write(void *opaque, hwaddr addr,
uint16_t diff;
if (size != 2) {
return omap_badwidth_write16(opaque, addr, value);
omap_badwidth_write16(opaque, addr, value);
return;
}
switch (addr) {
@@ -1982,7 +1994,8 @@ static void omap_mpuio_write(void *opaque, hwaddr addr,
int ln;
if (size != 2) {
return omap_badwidth_write16(opaque, addr, value);
omap_badwidth_write16(opaque, addr, value);
return;
}
switch (offset) {
@@ -2210,7 +2223,8 @@ static void omap_uwire_write(void *opaque, hwaddr addr,
int offset = addr & OMAP_MPUI_REG_MASK;
if (size != 2) {
return omap_badwidth_write16(opaque, addr, value);
omap_badwidth_write16(opaque, addr, value);
return;
}
switch (offset) {
@@ -2349,7 +2363,8 @@ static void omap_pwl_write(void *opaque, hwaddr addr,
int offset = addr & OMAP_MPUI_REG_MASK;
if (size != 1) {
return omap_badwidth_write8(opaque, addr, value);
omap_badwidth_write8(opaque, addr, value);
return;
}
switch (offset) {
@@ -2444,7 +2459,8 @@ static void omap_pwt_write(void *opaque, hwaddr addr,
int offset = addr & OMAP_MPUI_REG_MASK;
if (size != 1) {
return omap_badwidth_write8(opaque, addr, value);
omap_badwidth_write8(opaque, addr, value);
return;
}
switch (offset) {
@@ -2637,7 +2653,8 @@ static void omap_rtc_write(void *opaque, hwaddr addr,
time_t ti[2];
if (size != 1) {
return omap_badwidth_write8(opaque, addr, value);
omap_badwidth_write8(opaque, addr, value);
return;
}
switch (offset) {
@@ -3410,9 +3427,14 @@ static void omap_mcbsp_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
switch (size) {
case 2: return omap_mcbsp_writeh(opaque, addr, value);
case 4: return omap_mcbsp_writew(opaque, addr, value);
default: return omap_badwidth_write16(opaque, addr, value);
case 2:
omap_mcbsp_writeh(opaque, addr, value);
break;
case 4:
omap_mcbsp_writew(opaque, addr, value);
break;
default:
omap_badwidth_write16(opaque, addr, value);
}
}
@@ -3586,7 +3608,8 @@ static void omap_lpg_write(void *opaque, hwaddr addr,
int offset = addr & OMAP_MPUI_REG_MASK;
if (size != 1) {
return omap_badwidth_write8(opaque, addr, value);
omap_badwidth_write8(opaque, addr, value);
return;
}
switch (offset) {
+8 -4
View File
@@ -447,7 +447,8 @@ static void omap_eac_write(void *opaque, hwaddr addr,
struct omap_eac_s *s = (struct omap_eac_s *) opaque;
if (size != 2) {
return omap_badwidth_write16(opaque, addr, value);
omap_badwidth_write16(opaque, addr, value);
return;
}
switch (addr) {
@@ -692,7 +693,8 @@ static void omap_sti_write(void *opaque, hwaddr addr,
struct omap_sti_s *s = (struct omap_sti_s *) opaque;
if (size != 4) {
return omap_badwidth_write32(opaque, addr, value);
omap_badwidth_write32(opaque, addr, value);
return;
}
switch (addr) {
@@ -757,7 +759,8 @@ static void omap_sti_fifo_write(void *opaque, hwaddr addr,
uint8_t byte = value;
if (size != 1) {
return omap_badwidth_write8(opaque, addr, size);
omap_badwidth_write8(opaque, addr, size);
return;
}
if (ch == STI_TRACE_CONTROL_CHANNEL) {
@@ -1359,7 +1362,8 @@ static void omap_prcm_write(void *opaque, hwaddr addr,
struct omap_prcm_s *s = (struct omap_prcm_s *) opaque;
if (size != 4) {
return omap_badwidth_write32(opaque, addr, value);
omap_badwidth_write32(opaque, addr, value);
return;
}
switch (addr) {
+2 -1
View File
@@ -562,7 +562,7 @@ static void vexpress_common_init(MachineState *machine)
* If a bios file was provided, attempt to map it into memory
*/
if (bios_name) {
const char *fn;
char *fn;
if (drive_get(IF_PFLASH, 0, 0)) {
error_report("The contents of the first flash device may be "
@@ -576,6 +576,7 @@ static void vexpress_common_init(MachineState *machine)
error_report("Could not load ROM image '%s'", bios_name);
exit(1);
}
g_free(fn);
}
/* Motherboard peripherals: the wiring is the same but the
+3 -2
View File
@@ -552,7 +552,7 @@ static void create_flash(const VirtBoardInfo *vbi)
char *nodename;
if (bios_name) {
const char *fn;
char *fn;
if (drive_get(IF_PFLASH, 0, 0)) {
error_report("The contents of the first flash device may be "
@@ -565,6 +565,7 @@ static void create_flash(const VirtBoardInfo *vbi)
error_report("Could not load ROM image '%s'", bios_name);
exit(1);
}
g_free(fn);
}
create_one_flash("virt.flash0", flashbase, flashsize);
@@ -770,7 +771,7 @@ static void machvirt_init(MachineState *machine)
cc->parse_features(CPU(cpuobj), cpuopts, &err);
g_free(cpuopts);
if (err) {
error_report("%s", error_get_pretty(err));
error_report_err(err);
exit(1);
}
+2 -1
View File
@@ -112,7 +112,8 @@ static void omap_uart_write(void *opaque, hwaddr addr,
struct omap_uart_s *s = (struct omap_uart_s *) opaque;
if (size == 4) {
return omap_badwidth_write8(opaque, addr, value);
omap_badwidth_write8(opaque, addr, value);
return;
}
switch (addr) {
+1 -1
View File
@@ -267,7 +267,7 @@ int load_aout(const char *filename, hwaddr addr, int max_sz,
/* ELF loader */
static void *load_at(int fd, int offset, int size)
static void *load_at(int fd, off_t offset, size_t size)
{
void *ptr;
if (lseek(fd, offset, SEEK_SET) < 0)
+10 -5
View File
@@ -212,7 +212,8 @@ static void omap_diss_write(void *opaque, hwaddr addr,
struct omap_dss_s *s = (struct omap_dss_s *) opaque;
if (size != 4) {
return omap_badwidth_write32(opaque, addr, value);
omap_badwidth_write32(opaque, addr, value);
return;
}
switch (addr) {
@@ -377,7 +378,8 @@ static void omap_disc_write(void *opaque, hwaddr addr,
struct omap_dss_s *s = (struct omap_dss_s *) opaque;
if (size != 4) {
return omap_badwidth_write32(opaque, addr, value);
omap_badwidth_write32(opaque, addr, value);
return;
}
switch (addr) {
@@ -736,7 +738,8 @@ static void omap_rfbi_write(void *opaque, hwaddr addr,
struct omap_dss_s *s = (struct omap_dss_s *) opaque;
if (size != 4) {
return omap_badwidth_write32(opaque, addr, value);
omap_badwidth_write32(opaque, addr, value);
return;
}
switch (addr) {
@@ -928,7 +931,8 @@ static void omap_venc_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
if (size != 4) {
return omap_badwidth_write32(opaque, addr, size);
omap_badwidth_write32(opaque, addr, size);
return;
}
switch (addr) {
@@ -1016,7 +1020,8 @@ static void omap_im3_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
if (size != 4) {
return omap_badwidth_write32(opaque, addr, value);
omap_badwidth_write32(opaque, addr, value);
return;
}
switch (addr) {

Some files were not shown because too many files have changed in this diff Show More