* [Qemu-devel] [PATCH] Drop superfluous conditionals around qemu_opts_del()
@ 2014-12-03 10:28 Markus Armbruster
2014-12-03 10:30 ` Paolo Bonzini
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Markus Armbruster @ 2014-12-03 10:28 UTC (permalink / raw
To: qemu-devel; +Cc: qemu-trivial, pbonzini
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
hw/core/qdev.c | 4 +---
qemu-char.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 35fd00d..901f289 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -1141,9 +1141,7 @@ static void device_finalize(Object *obj)
NamedGPIOList *ngl, *next;
DeviceState *dev = DEVICE(obj);
- if (dev->opts) {
- qemu_opts_del(dev->opts);
- }
+ qemu_opts_del(dev->opts);
QLIST_FOREACH_SAFE(ngl, &dev->gpios, node, next) {
QLIST_REMOVE(ngl, node);
diff --git a/qemu-char.c b/qemu-char.c
index a8b01da..ef84b53 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -3825,9 +3825,7 @@ void qemu_chr_delete(CharDriverState *chr)
}
g_free(chr->filename);
g_free(chr->label);
- if (chr->opts) {
- qemu_opts_del(chr->opts);
- }
+ qemu_opts_del(chr->opts);
g_free(chr);
}
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] Drop superfluous conditionals around qemu_opts_del()
2014-12-03 10:28 [Qemu-devel] [PATCH] Drop superfluous conditionals around qemu_opts_del() Markus Armbruster
@ 2014-12-03 10:30 ` Paolo Bonzini
2014-12-03 10:33 ` Gonglei
2014-12-10 8:27 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2014-12-03 10:30 UTC (permalink / raw
To: Markus Armbruster, qemu-devel; +Cc: qemu-trivial
On 03/12/2014 11:28, Markus Armbruster wrote:
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> hw/core/qdev.c | 4 +---
> qemu-char.c | 4 +---
> 2 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/hw/core/qdev.c b/hw/core/qdev.c
> index 35fd00d..901f289 100644
> --- a/hw/core/qdev.c
> +++ b/hw/core/qdev.c
> @@ -1141,9 +1141,7 @@ static void device_finalize(Object *obj)
> NamedGPIOList *ngl, *next;
>
> DeviceState *dev = DEVICE(obj);
> - if (dev->opts) {
> - qemu_opts_del(dev->opts);
> - }
> + qemu_opts_del(dev->opts);
>
> QLIST_FOREACH_SAFE(ngl, &dev->gpios, node, next) {
> QLIST_REMOVE(ngl, node);
> diff --git a/qemu-char.c b/qemu-char.c
> index a8b01da..ef84b53 100644
> --- a/qemu-char.c
> +++ b/qemu-char.c
> @@ -3825,9 +3825,7 @@ void qemu_chr_delete(CharDriverState *chr)
> }
> g_free(chr->filename);
> g_free(chr->label);
> - if (chr->opts) {
> - qemu_opts_del(chr->opts);
> - }
> + qemu_opts_del(chr->opts);
> g_free(chr);
> }
>
>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] Drop superfluous conditionals around qemu_opts_del()
2014-12-03 10:28 [Qemu-devel] [PATCH] Drop superfluous conditionals around qemu_opts_del() Markus Armbruster
2014-12-03 10:30 ` Paolo Bonzini
@ 2014-12-03 10:33 ` Gonglei
2014-12-10 8:27 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2 siblings, 0 replies; 4+ messages in thread
From: Gonglei @ 2014-12-03 10:33 UTC (permalink / raw
To: Markus Armbruster; +Cc: qemu-trivial, pbonzini, qemu-devel
On 2014/12/3 18:28, Markus Armbruster wrote:
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> hw/core/qdev.c | 4 +---
> qemu-char.c | 4 +---
> 2 files changed, 2 insertions(+), 6 deletions(-)
>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
> diff --git a/hw/core/qdev.c b/hw/core/qdev.c
> index 35fd00d..901f289 100644
> --- a/hw/core/qdev.c
> +++ b/hw/core/qdev.c
> @@ -1141,9 +1141,7 @@ static void device_finalize(Object *obj)
> NamedGPIOList *ngl, *next;
>
> DeviceState *dev = DEVICE(obj);
> - if (dev->opts) {
> - qemu_opts_del(dev->opts);
> - }
> + qemu_opts_del(dev->opts);
>
> QLIST_FOREACH_SAFE(ngl, &dev->gpios, node, next) {
> QLIST_REMOVE(ngl, node);
> diff --git a/qemu-char.c b/qemu-char.c
> index a8b01da..ef84b53 100644
> --- a/qemu-char.c
> +++ b/qemu-char.c
> @@ -3825,9 +3825,7 @@ void qemu_chr_delete(CharDriverState *chr)
> }
> g_free(chr->filename);
> g_free(chr->label);
> - if (chr->opts) {
> - qemu_opts_del(chr->opts);
> - }
> + qemu_opts_del(chr->opts);
> g_free(chr);
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH] Drop superfluous conditionals around qemu_opts_del()
2014-12-03 10:28 [Qemu-devel] [PATCH] Drop superfluous conditionals around qemu_opts_del() Markus Armbruster
2014-12-03 10:30 ` Paolo Bonzini
2014-12-03 10:33 ` Gonglei
@ 2014-12-10 8:27 ` Michael Tokarev
2 siblings, 0 replies; 4+ messages in thread
From: Michael Tokarev @ 2014-12-10 8:27 UTC (permalink / raw
To: Markus Armbruster, qemu-devel; +Cc: qemu-trivial, pbonzini
Applied to -trivial, thank you!
/mjt
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-12-10 8:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-03 10:28 [Qemu-devel] [PATCH] Drop superfluous conditionals around qemu_opts_del() Markus Armbruster
2014-12-03 10:30 ` Paolo Bonzini
2014-12-03 10:33 ` Gonglei
2014-12-10 8:27 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.