trivial patches for 2015-05-09

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVTTGSAAoJEL7lnXSkw9fb6WUH/iWY2zJ+wNY/GCutyJ+bxq/0
 XeYhe+3DyjU7sAjDPnTjgJ26K1sYREhQkSDXbIXKpu+Ez9AAucBauDlYczVcklf0
 xiNVBCVDCvLZr2YwDctbV2WhqUVVJG78xMRlbpGapTPsvwPAG5CL+ZRN6l6Fp8G8
 yCHRvK7I9n2P8uZVqZiLd3jGTeRYqd7lBzHyOoxTQAuQdgOvuwf9zEKVZ+RxA5B0
 7ckuE8aZH0yyDDTG8w3nksWYLnEPizfT9MaNjI6AX4dwLPGv4BvvmGP6YwZRavRI
 +OopR7KliEdSaurj0ggM8rUcBkA37QHuIwRfmd3Syyx4HLOB3ckgGlWL8He9mpM=
 =PXUH
 -----END PGP SIGNATURE-----

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

trivial patches for 2015-05-09

# gpg: Signature made Fri May  8 22:58:42 2015 BST 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-05-09:
  docs: update BLOCK_IMAGE_CORRUPTED documentation
  glib-compat.h: change assert to g_assert
  Remove various unused functions
  sheepdog: fix resource leak with sd_snapshot_create
  xhci: remove unused code

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2015-05-11 13:54:00 +01:00
commit 9ad2c8cd41
9 changed files with 8 additions and 33 deletions

View File

@ -165,17 +165,6 @@ void tpm_backend_thread_end(TPMBackendThread *tbt)
}
}
void tpm_backend_thread_tpm_reset(TPMBackendThread *tbt,
GFunc func, gpointer user_data)
{
if (!tbt->pool) {
tpm_backend_thread_create(tbt, func, user_data);
} else {
g_thread_pool_push(tbt->pool, (gpointer)TPM_BACKEND_CMD_TPM_RESET,
NULL);
}
}
static const TypeInfo tpm_backend_info = {
.name = TYPE_TPM_BACKEND,
.parent = TYPE_OBJECT,

View File

@ -2341,6 +2341,7 @@ static int sd_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info)
if (ret < 0) {
error_report("failed to create inode for snapshot: %s",
error_get_pretty(local_err));
error_free(local_err);
goto cleanup;
}

View File

@ -43,9 +43,10 @@ Data:
- "msg": Informative message (e.g., reason for the corruption)
(json-string)
- "offset": If the corruption resulted from an image access, this
is the access offset into the image (json-int)
is the host's access offset into the image
(json-int, optional)
- "size": If the corruption resulted from an image access, this
is the access size (json-int)
is the access size (json-int, optional)
Example:

View File

@ -2203,7 +2203,6 @@ static void xhci_kick_ep(XHCIState *xhci, unsigned int slotid,
if (epid == 1) {
if (xhci_fire_ctl_transfer(xhci, xfer) >= 0) {
epctx->next_xfer = (epctx->next_xfer + 1) % TD_QUEUE;
ep = xfer->packet.ep;
} else {
DPRINTF("xhci: error firing CTL transfer\n");
}

View File

@ -115,7 +115,7 @@ static inline void g_mutex_init(CompatGMutex *mutex)
static inline void g_mutex_clear(CompatGMutex *mutex)
{
assert(mutex->once.status != G_ONCE_STATUS_PROGRESS);
g_assert(mutex->once.status != G_ONCE_STATUS_PROGRESS);
if (mutex->once.retval) {
g_mutex_free((GMutex *) mutex->once.retval);
}
@ -155,7 +155,7 @@ static inline void g_cond_init(CompatGCond *cond)
static inline void g_cond_clear(CompatGCond *cond)
{
assert(cond->once.status != G_ONCE_STATUS_PROGRESS);
g_assert(cond->once.status != G_ONCE_STATUS_PROGRESS);
if (cond->once.retval) {
g_cond_free((GCond *) cond->once.retval);
}
@ -164,7 +164,7 @@ static inline void g_cond_clear(CompatGCond *cond)
static inline void (g_cond_wait)(CompatGCond *cond, CompatGMutex *mutex)
{
assert(mutex->once.status != G_ONCE_STATUS_PROGRESS);
g_assert(mutex->once.status != G_ONCE_STATUS_PROGRESS);
g_once(&cond->once, do_g_cond_new, NULL);
g_cond_wait((GCond *) cond->once.retval, (GMutex *) mutex->once.retval);
}

View File

@ -33,7 +33,6 @@ typedef struct {
#define IOTHREAD(obj) \
OBJECT_CHECK(IOThread, obj, TYPE_IOTHREAD)
IOThread *iothread_find(const char *id);
char *iothread_get_id(IOThread *iothread);
AioContext *iothread_get_aio_context(IOThread *iothread);

View File

@ -32,8 +32,6 @@ void tpm_backend_thread_deliver_request(TPMBackendThread *tbt);
void tpm_backend_thread_create(TPMBackendThread *tbt,
GFunc func, gpointer user_data);
void tpm_backend_thread_end(TPMBackendThread *tbt);
void tpm_backend_thread_tpm_reset(TPMBackendThread *tbt,
GFunc func, gpointer user_data);
typedef enum TPMBackendCmd {
TPM_BACKEND_CMD_INIT = 1,

View File

@ -114,18 +114,6 @@ static void iothread_register_types(void)
type_init(iothread_register_types)
IOThread *iothread_find(const char *id)
{
Object *container = container_get(object_get_root(), IOTHREADS_PATH);
Object *child;
child = object_property_get_link(container, id, NULL);
if (!child) {
return NULL;
}
return (IOThread *)object_dynamic_cast(child, TYPE_IOTHREAD);
}
char *iothread_get_id(IOThread *iothread)
{
return object_get_canonical_path_component(OBJECT(iothread));

View File

@ -1847,7 +1847,7 @@
# not guaranteed to be stable
#
# @offset: #optional, if the corruption resulted from an image access, this is
# the access offset into the image
# the host's access offset into the image
#
# @size: #optional, if the corruption resulted from an image access, this is
# the access size