Skip to contentSkip to conversation

xen-block: Replace qdict_put_obj() by qdict_put() where appropriate

PATCH In review Markus Armbruster 5 participants 7 messages Mar 13, 2019 – Mar 15, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen-block: Replace qdict_put_obj() by qdict_put() where appropriate

Patch created mechanically by rerunning:

    $ spatch --sp-file scripts/coccinelle/qobject.cocci \
             --macro-file scripts/cocci-macro-file.h \
             --dir hw/block --in-place
---
 hw/block/xen-block.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/block/xen-block.c +2 -2
index 70fc2455e8..9c722b9b95 100644
@@ -771,7 +771,7 @@ static XenBlockDrive *xen_block_drive_create(const char *id,
             QDict *cache_qdict = qdict_new();
 
             qdict_put_bool(cache_qdict, "direct", true);
-            qdict_put_obj(file_layer, "cache", QOBJECT(cache_qdict));
+            qdict_put(file_layer, "cache", cache_qdict);
 
             qdict_put_str(file_layer, "aio", "native");
         }
@@ -796,7 +796,7 @@ static XenBlockDrive *xen_block_drive_create(const char *id,
     qdict_put_str(driver_layer, "driver", driver);
     g_free(driver);
 
-    qdict_put_obj(driver_layer, "file", QOBJECT(file_layer));
+    qdict_put(driver_layer, "file", file_layer);
 
     g_assert(!drive->node_name);
     drive->node_name = xen_block_blockdev_add(drive->id, driver_layer,
Signature · 7 lines
2.17.2


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Markus Armbruster

Patch created mechanically by rerunning:

    $ spatch --sp-file scripts/coccinelle/qobject.cocci \
             --macro-file scripts/cocci-macro-file.h \
             --dir hw/block --in-place
---
 hw/block/xen-block.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Safe for 4.0 softfreeze in my opinion, but also harmless if it slips to 4.1.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by on v1 1/1
#2 lore raw
In reply to Markus Armbruster
Quoted 8 lines

-----Original Message-----
From: Markus Armbruster [mailto:[email protected]]
Sent: 13 March 2019 17:45
To: [email protected]
Cc: [email protected]; Anthony Perard <[email protected]>; Paul Durrant <[email protected]>; [email protected]; [email protected]
Subject: [PATCH] xen-block: Replace qdict_put_obj() by qdict_put() where appropriate

Quoted 7 lines

Patch created mechanically by rerunning:

    $ spatch --sp-file scripts/coccinelle/qobject.cocci \
             --macro-file scripts/cocci-macro-file.h \
             --dir hw/block --in-place
Quoted 27 lines
---
 hw/block/xen-block.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/block/xen-block.c +2 -3
index 70fc2455e8..9c722b9b95 100644
@@ -771,7 +771,7 @@ static XenBlockDrive *xen_block_drive_create(const char *id,
             QDict *cache_qdict = qdict_new();
 
             qdict_put_bool(cache_qdict, "direct", true);
-            qdict_put_obj(file_layer, "cache", QOBJECT(cache_qdict));
+            qdict_put(file_layer, "cache", cache_qdict);
 
             qdict_put_str(file_layer, "aio", "native");
         }
@@ -796,7 +796,7 @@ static XenBlockDrive *xen_block_drive_create(const char *id,
     qdict_put_str(driver_layer, "driver", driver);
     g_free(driver);
 
-    qdict_put_obj(driver_layer, "file", QOBJECT(file_layer));
+    qdict_put(driver_layer, "file", file_layer);
 
     g_assert(!drive->node_name);
     drive->node_name = xen_block_blockdev_add(drive->id, driver_layer,
--
Quoted 1 line

2.17.2

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reviewed-by on v1 1/1
#3 lore raw
In reply to Markus Armbruster

Am 13.03.2019 um 18:44 hat Markus Armbruster geschrieben:

Quoted 7 lines

Patch created mechanically by rerunning:

    $ spatch --sp-file scripts/coccinelle/qobject.cocci \
             --macro-file scripts/cocci-macro-file.h \
             --dir hw/block --in-place

Which tree should this go through? The Xen one?

Kevin

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#4 lore raw
Quoted 10 lines · Kevin Wolf

Am 13.03.2019 um 18:44 hat Markus Armbruster geschrieben:

Quoted 7 lines

Patch created mechanically by rerunning:

    $ spatch --sp-file scripts/coccinelle/qobject.cocci \
             --macro-file scripts/cocci-macro-file.h \
             --dir hw/block --in-place

Thanks!

Quoted 1 line

Which tree should this go through? The Xen one?

Fine with me. I could also include it in a "miscellaneous cleanup" pull request along with other cleanup patches I got in flight.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#5 lore raw
Quoted 11 lines · Markus Armbruster
Quoted 9 lines · Kevin Wolf

Am 13.03.2019 um 18:44 hat Markus Armbruster geschrieben:

Quoted 7 lines

Patch created mechanically by rerunning:

    $ spatch --sp-file scripts/coccinelle/qobject.cocci \
             --macro-file scripts/cocci-macro-file.h \
             --dir hw/block --in-place
Quoted 8 lines
Quoted 1 line

Thanks!

Quoted 1 line

Which tree should this go through? The Xen one?

Fine with me. I could also include it in a "miscellaneous cleanup" pull request along with other cleanup patches I got in flight.

Markus, I don't have any other Xen patches, so could you include this one in your pull request?

Thanks,

Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#6 lore raw
Quoted 16 lines · Anthony PERARD
Quoted 15 lines · Markus Armbruster
Quoted 10 lines · Kevin Wolf

Am 13.03.2019 um 18:44 hat Markus Armbruster geschrieben:

Quoted 7 lines

Patch created mechanically by rerunning:

    $ spatch --sp-file scripts/coccinelle/qobject.cocci \
             --macro-file scripts/cocci-macro-file.h \
             --dir hw/block --in-place

Thanks!

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Which tree should this go through? The Xen one?

Fine with me. I could also include it in a "miscellaneous cleanup" pull request along with other cleanup patches I got in flight.

Markus, I don't have any other Xen patches, so could you include this one in your pull request?

Sure!

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel