QEMU-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Minor cleanups: eliminate redundant code in QOM, block-backend and vl.c
@ 2026-04-29  6:20 Bin Guo
  2026-04-29  6:20 ` [PATCH 1/3] qom/object: merge double hash table traversal in object_property_del_child Bin Guo
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Bin Guo @ 2026-04-29  6:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, berrange, kwolf, hreitz, qemu-block

This series contains three independent cleanups that remove redundant
code and improve consistency across different subsystems.

Patch 1 merges a double hash-table traversal in object_property_del_child()
into a single pass, halving the number of hash table operations in the
common case.

Patch 2 makes blk_co_preadv() a one-liner wrapper around
blk_co_preadv_part(), matching the existing pattern already used by
the write side (blk_co_pwritev / blk_co_pwritev_part).

Patch 3 inlines qemu_opts_parse_noisily() return-value checks directly
into if-conditions for options that do not use the returned pointer,
matching the style already used by QEMU_OPTION_action.

All three patches are independent and can be applied in any order.

Bin Guo (3):
  qom/object: merge double hash table traversal in
    object_property_del_child
  block/block-backend: delegate blk_co_preadv to blk_co_preadv_part
  system/vl.c: inline qemu_opts_parse_noisily() result checks

 block/block-backend.c |  8 +-------
 qom/object.c          |  7 -------
 system/vl.c           | 37 +++++++++++++++----------------------
 3 files changed, 16 insertions(+), 36 deletions(-)

-- 
2.50.1 (Apple Git-155)



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-05-12 12:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-29  6:20 [PATCH 0/3] Minor cleanups: eliminate redundant code in QOM, block-backend and vl.c Bin Guo
2026-04-29  6:20 ` [PATCH 1/3] qom/object: merge double hash table traversal in object_property_del_child Bin Guo
2026-04-29 21:07   ` Richard Henderson
2026-04-30  9:24     ` Daniel P. Berrangé
2026-04-30 13:36       ` Philippe Mathieu-Daudé
2026-04-29  6:20 ` [PATCH 2/3] block/block-backend: delegate blk_co_preadv to blk_co_preadv_part Bin Guo
2026-04-29 21:07   ` Richard Henderson
2026-05-12 12:58   ` Kevin Wolf
2026-04-29  6:20 ` [PATCH 3/3] system/vl.c: inline qemu_opts_parse_noisily() result checks Bin Guo
2026-04-29  8:04   ` Philippe Mathieu-Daudé
2026-04-29 21:03     ` Richard Henderson
2026-04-30  6:07       ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox