* [Qemu-devel] [PULL 0/5] Trivial patches for 2015-05-09
@ 2015-05-08 22:00 Michael Tokarev
2015-05-08 22:00 ` [Qemu-devel] [PULL 1/5] xhci: remove unused code Michael Tokarev
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Michael Tokarev @ 2015-05-08 22:00 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev
Here's a next trivial-patches tree pull request. There aren't many patches
this time, but one of them (replacing assert with g_assert) is a build fix.
Please consider applying.
Thanks,
/mjt
The following changes since commit f8340b360b9bc29d48716ba8aca79df2b9544979:
hw/ptimer: Do not artificially limit timers when using icount (2015-05-08 17:15:23 +1000)
are available in the git repository at:
git://git.corpit.ru/qemu.git tags/pull-trivial-patches-2015-05-09
for you to fetch changes up to 0caef8f6df4a9426bd6333ab843ce51ce005d7d0:
docs: update BLOCK_IMAGE_CORRUPTED documentation (2015-05-08 14:11:10 +0300)
----------------------------------------------------------------
trivial patches for 2015-05-09
----------------------------------------------------------------
Alberto Garcia (1):
docs: update BLOCK_IMAGE_CORRUPTED documentation
Gonglei (1):
xhci: remove unused code
Michael Tokarev (1):
glib-compat.h: change assert to g_assert
Thomas Huth (1):
Remove various unused functions
zhanghailiang (1):
sheepdog: fix resource leak with sd_snapshot_create
backends/tpm.c | 11 -----------
block/sheepdog.c | 1 +
docs/qmp/qmp-events.txt | 5 +++--
hw/usb/hcd-xhci.c | 1 -
include/glib-compat.h | 6 +++---
include/sysemu/iothread.h | 1 -
include/sysemu/tpm_backend_int.h | 2 --
iothread.c | 12 ------------
qapi/block-core.json | 2 +-
9 files changed, 8 insertions(+), 33 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] [PULL 1/5] xhci: remove unused code
2015-05-08 22:00 [Qemu-devel] [PULL 0/5] Trivial patches for 2015-05-09 Michael Tokarev
@ 2015-05-08 22:00 ` Michael Tokarev
2015-05-08 22:00 ` [Qemu-devel] [PULL 2/5] sheepdog: fix resource leak with sd_snapshot_create Michael Tokarev
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Michael Tokarev @ 2015-05-08 22:00 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Gonglei, Michael Tokarev, Gerd Hoffmann
From: Gonglei <arei.gonglei@huawei.com>
Value from xfer->packet.ep is assigned to ep here, but that
stored value is not used before it is overwritten. Remove it.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/usb/hcd-xhci.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index ba15ae0..99f11fc 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -2204,7 +2204,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");
}
--
2.1.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PULL 2/5] sheepdog: fix resource leak with sd_snapshot_create
2015-05-08 22:00 [Qemu-devel] [PULL 0/5] Trivial patches for 2015-05-09 Michael Tokarev
2015-05-08 22:00 ` [Qemu-devel] [PULL 1/5] xhci: remove unused code Michael Tokarev
@ 2015-05-08 22:00 ` Michael Tokarev
2015-05-08 22:00 ` [Qemu-devel] [PULL 3/5] Remove various unused functions Michael Tokarev
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Michael Tokarev @ 2015-05-08 22:00 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, zhanghailiang
From: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
block/sheepdog.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 2d5f06a..bd7cbed 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -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;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PULL 3/5] Remove various unused functions
2015-05-08 22:00 [Qemu-devel] [PULL 0/5] Trivial patches for 2015-05-09 Michael Tokarev
2015-05-08 22:00 ` [Qemu-devel] [PULL 1/5] xhci: remove unused code Michael Tokarev
2015-05-08 22:00 ` [Qemu-devel] [PULL 2/5] sheepdog: fix resource leak with sd_snapshot_create Michael Tokarev
@ 2015-05-08 22:00 ` Michael Tokarev
2015-05-08 22:00 ` [Qemu-devel] [PULL 4/5] glib-compat.h: change assert to g_assert Michael Tokarev
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Michael Tokarev @ 2015-05-08 22:00 UTC (permalink / raw)
To: qemu-devel; +Cc: Thomas Huth, qemu-trivial, Michael Tokarev
From: Thomas Huth <huth@tuxfamily.org>
The functions tpm_backend_thread_tpm_reset() and iothread_find()
are completely unused, let's remove them.
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
backends/tpm.c | 11 -----------
include/sysemu/iothread.h | 1 -
include/sysemu/tpm_backend_int.h | 2 --
iothread.c | 12 ------------
4 files changed, 26 deletions(-)
diff --git a/backends/tpm.c b/backends/tpm.c
index 4efe367..36c5d46 100644
--- a/backends/tpm.c
+++ b/backends/tpm.c
@@ -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,
diff --git a/include/sysemu/iothread.h b/include/sysemu/iothread.h
index 7c01a61..2eefea1 100644
--- a/include/sysemu/iothread.h
+++ b/include/sysemu/iothread.h
@@ -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);
diff --git a/include/sysemu/tpm_backend_int.h b/include/sysemu/tpm_backend_int.h
index 05d94d0..40f693a 100644
--- a/include/sysemu/tpm_backend_int.h
+++ b/include/sysemu/tpm_backend_int.h
@@ -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,
diff --git a/iothread.c b/iothread.c
index a1f9109..0416fc4 100644
--- a/iothread.c
+++ b/iothread.c
@@ -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));
--
2.1.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PULL 4/5] glib-compat.h: change assert to g_assert
2015-05-08 22:00 [Qemu-devel] [PULL 0/5] Trivial patches for 2015-05-09 Michael Tokarev
` (2 preceding siblings ...)
2015-05-08 22:00 ` [Qemu-devel] [PULL 3/5] Remove various unused functions Michael Tokarev
@ 2015-05-08 22:00 ` Michael Tokarev
2015-05-08 22:00 ` [Qemu-devel] [PULL 5/5] docs: update BLOCK_IMAGE_CORRUPTED documentation Michael Tokarev
2015-05-11 14:06 ` [Qemu-devel] [PULL 0/5] Trivial patches for 2015-05-09 Peter Maydell
5 siblings, 0 replies; 7+ messages in thread
From: Michael Tokarev @ 2015-05-08 22:00 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev
include/glib-compat.h defines a bunch of functions based on glib primitives,
and uses assert() without including assert.h. Replace assert() with
g_assert() to make the file more self-contained, and to fix compilation
breakage after 28507a415a9b1e.
Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Tested-by: Laurent Desnogues <laurent.desnogues@gmail.com>
---
include/glib-compat.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/glib-compat.h b/include/glib-compat.h
index 011352b..28d9f15 100644
--- a/include/glib-compat.h
+++ b/include/glib-compat.h
@@ -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);
}
--
2.1.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PULL 5/5] docs: update BLOCK_IMAGE_CORRUPTED documentation
2015-05-08 22:00 [Qemu-devel] [PULL 0/5] Trivial patches for 2015-05-09 Michael Tokarev
` (3 preceding siblings ...)
2015-05-08 22:00 ` [Qemu-devel] [PULL 4/5] glib-compat.h: change assert to g_assert Michael Tokarev
@ 2015-05-08 22:00 ` Michael Tokarev
2015-05-11 14:06 ` [Qemu-devel] [PULL 0/5] Trivial patches for 2015-05-09 Peter Maydell
5 siblings, 0 replies; 7+ messages in thread
From: Michael Tokarev @ 2015-05-08 22:00 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael Tokarev, Alberto Garcia
From: Alberto Garcia <berto@igalia.com>
Label the "size" and "offset" fields in BLOCK_IMAGE_CORRUPTED as
optional, and clarify that the latter refers to the host's offset into
the image.
Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
docs/qmp/qmp-events.txt | 5 +++--
qapi/block-core.json | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/docs/qmp/qmp-events.txt b/docs/qmp/qmp-events.txt
index b19e490..64ba46c 100644
--- a/docs/qmp/qmp-events.txt
+++ b/docs/qmp/qmp-events.txt
@@ -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:
diff --git a/qapi/block-core.json b/qapi/block-core.json
index dcf7c04..863ffea 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -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
--
2.1.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Trivial patches for 2015-05-09
2015-05-08 22:00 [Qemu-devel] [PULL 0/5] Trivial patches for 2015-05-09 Michael Tokarev
` (4 preceding siblings ...)
2015-05-08 22:00 ` [Qemu-devel] [PULL 5/5] docs: update BLOCK_IMAGE_CORRUPTED documentation Michael Tokarev
@ 2015-05-11 14:06 ` Peter Maydell
5 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2015-05-11 14:06 UTC (permalink / raw)
To: Michael Tokarev; +Cc: QEMU Trivial, QEMU Developers
On 8 May 2015 at 23:00, Michael Tokarev <mjt@tls.msk.ru> wrote:
> Here's a next trivial-patches tree pull request. There aren't many patches
> this time, but one of them (replacing assert with g_assert) is a build fix.
> Please consider applying.
>
> Thanks,
>
> /mjt
>
> The following changes since commit f8340b360b9bc29d48716ba8aca79df2b9544979:
>
> hw/ptimer: Do not artificially limit timers when using icount (2015-05-08 17:15:23 +1000)
>
> are available in the git repository at:
>
> git://git.corpit.ru/qemu.git tags/pull-trivial-patches-2015-05-09
>
> for you to fetch changes up to 0caef8f6df4a9426bd6333ab843ce51ce005d7d0:
>
> docs: update BLOCK_IMAGE_CORRUPTED documentation (2015-05-08 14:11:10 +0300)
>
> ----------------------------------------------------------------
> trivial patches for 2015-05-09
>
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-05-11 14:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-08 22:00 [Qemu-devel] [PULL 0/5] Trivial patches for 2015-05-09 Michael Tokarev
2015-05-08 22:00 ` [Qemu-devel] [PULL 1/5] xhci: remove unused code Michael Tokarev
2015-05-08 22:00 ` [Qemu-devel] [PULL 2/5] sheepdog: fix resource leak with sd_snapshot_create Michael Tokarev
2015-05-08 22:00 ` [Qemu-devel] [PULL 3/5] Remove various unused functions Michael Tokarev
2015-05-08 22:00 ` [Qemu-devel] [PULL 4/5] glib-compat.h: change assert to g_assert Michael Tokarev
2015-05-08 22:00 ` [Qemu-devel] [PULL 5/5] docs: update BLOCK_IMAGE_CORRUPTED documentation Michael Tokarev
2015-05-11 14:06 ` [Qemu-devel] [PULL 0/5] Trivial patches for 2015-05-09 Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).