Skip to content

Eliminate drive_get_next()

Markus Armbruster qemu-arm qemu-devel qemu-riscv 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 19 repliesIn review
  2. v1 RFC2 patches 13 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13hw/sd/ssi-sd: Do not create SD card within controller's realizehw/arm/stellaris.c hw/riscv/sifive_u.c hw/sd/ssi-sd.c+27 -304 replies
2/13hw: Replace trivial drive_get_next() by drive_get()hw/arm/cubieboard.c hw/arm/integratorcp.c hw/arm/msf2-som.c +8 more+11 -111 reply
3/13hw/arm/npcm7xx_boards: Replace drive_get_next() by drive_get()hw/arm/npcm7xx_boards.c+3 -33 replies
4/13hw/arm/versatilepb hw/arm/vexpress: Replace drive_get_next() by drive_get()hw/arm/versatilepb.c hw/arm/vexpress.c+5 -51 reply
5/13hw/arm/imx25_pdk: Replace drive_get_next() by drive_get()hw/arm/imx25_pdk.c+1 -11 reply
6/13hw/arm/mcimx6ul-evk: Replace drive_get_next() by drive_get()hw/arm/mcimx6ul-evk.c+1 -11 reply
7/13hw/arm/mcimx7d-sabre: Replace drive_get_next() by drive_get()hw/arm/mcimx7d-sabre.c+1 -11 reply
8/13hw/arm/xlnx-versal-virt: Replace drive_get_next() by drive_get()hw/arm/xlnx-versal-virt.c+2 -11 reply
9/13hw/microblaze: Replace drive_get_next() by drive_get()hw/microblaze/petalogix_ml605_mmu.c+1 -11 reply
10/13hw/arm/xlnx-zcu102: Replace drive_get_next() by drive_get()hw/arm/xlnx-zcu102.c+3 -31 reply
11/13hw/arm/xilinx_zynq: Replace drive_get_next() by drive_get()hw/arm/xilinx_zynq.c+9 -71 reply
12/13hw/arm/aspeed: Replace drive_get_next() by drive_get()hw/arm/aspeed.c+13 -81 reply
13/13blockdev: Drop unused drive_get_next()blockdev.c include/sysemu/blockdev.h+0 -111 reply

Reviews trailers per patch

All 13 patches have a Reviewed-by or Acked-by.

PatchHavard SkinnemoenPhilippe Mathieu-DaudéHanna ReitzCédric Le GoaterEdgar E. IglesiasAlistair FrancisPeter Maydell
1/13R-b R-b
2/13R-b
3/13R-b
4/13R-b
5/13R-b
6/13R-b
7/13R-b
8/13A-b
9/13A-b
10/13A-b
11/13A-b
12/13R-b
13/13R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 7 reviewers.

Read the v2 thread

Cover letter [PATCH v2 00/13] Eliminate drive_get_next()

drive_get_next() is basically a bad idea. It returns the "next" block backend of a certain interface type. "Next" means bus=0,unit=N, where subsequent calls count N up from zero, per interface type.

This lets you define unit numbers implicitly by execution order. If the order changes, or new calls appear "in the middle", unit numbers change. ABI break. Hard to spot in review. Replace its uses by drive_get(), then delete it.

Markus Armbruster (13):
hw/sd/ssi-sd: Do not create SD card within controller's realize
hw: Replace trivial drive_get_next() by drive_get() hw/arm/npcm7xx_boards: Replace drive_get_next() by drive_get() hw/arm/versatilepb hw/arm/vexpress: Replace drive_get_next() by

    drive_get()

hw/arm/imx25_pdk: Replace drive_get_next() by drive_get() hw/arm/mcimx6ul-evk: Replace drive_get_next() by drive_get() hw/arm/mcimx7d-sabre: Replace drive_get_next() by drive_get() hw/arm/xlnx-versal-virt: Replace drive_get_next() by drive_get() hw/microblaze: Replace drive_get_next() by drive_get() hw/arm/xlnx-zcu102: Replace drive_get_next() by drive_get() hw/arm/xilinx_zynq: Replace drive_get_next() by drive_get() hw/arm/aspeed: Replace drive_get_next() by drive_get()
blockdev: Drop unused drive_get_next()

 include/sysemu/blockdev.h           |  1 -
 blockdev.c                          | 10 ----------
 hw/arm/aspeed.c                     | 21 +++++++++++++--------
 hw/arm/cubieboard.c                 |  2 +-
 hw/arm/imx25_pdk.c                  |  2 +-
 hw/arm/integratorcp.c               |  2 +-
 hw/arm/mcimx6ul-evk.c               |  2 +-
 hw/arm/mcimx7d-sabre.c              |  2 +-
 hw/arm/msf2-som.c                   |  2 +-
 hw/arm/npcm7xx_boards.c             |  6 +++---
 hw/arm/orangepi.c                   |  2 +-
 hw/arm/raspi.c                      |  2 +-
 hw/arm/realview.c                   |  2 +-
 hw/arm/sabrelite.c                  |  2 +-
 hw/arm/stellaris.c                  | 15 ++++++++++++++-
 hw/arm/versatilepb.c                |  4 ++--
 hw/arm/vexpress.c                   |  6 +++---
 hw/arm/xilinx_zynq.c                | 16 +++++++++-------
 hw/arm/xlnx-versal-virt.c           |  3 ++-
 hw/arm/xlnx-zcu102.c                |  6 +++---
 hw/microblaze/petalogix_ml605_mmu.c |  2 +-
 hw/misc/sifive_u_otp.c              |  2 +-
 hw/riscv/microchip_pfsoc.c          |  2 +-
 hw/riscv/sifive_u.c                 | 15 +++++++++++++--
 hw/sd/ssi-sd.c                      | 29 +----------------------------
 hw/sparc64/niagara.c                |  2 +-
 26 files changed, 77 insertions(+), 83 deletions(-)
Signature · 1 line
2.31.1