diff options
author | Markus Armbruster <armbru@redhat.com> | 2021-11-17 17:34:06 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2021-12-15 14:55:25 +0100 |
commit | 97ca6c2786e5dd1fd689c52ffe0cb082bc8bd477 (patch) | |
tree | a0a70ff09c61c4e41be6da7d93ac678dbaafb7d3 /module-common.c | |
parent | 0de89a863292836e6efb0c40c6f9221c89a2033a (diff) | |
download | qemu-97ca6c2786e5dd1fd689c52ffe0cb082bc8bd477.zip qemu-97ca6c2786e5dd1fd689c52ffe0cb082bc8bd477.tar.gz qemu-97ca6c2786e5dd1fd689c52ffe0cb082bc8bd477.tar.bz2 |
hw/arm/xlnx-zcu102: Replace drive_get_next() by drive_get()
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.
Machine "xlnx-zcu102" connects backends with drive_get_next() in
several counting loops. Change it to use drive_get() directly. This
makes the unit numbers explicit in the code.
Cc: Alistair Francis <alistair@alistair23.me>
Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20211117163409.3587705-11-armbru@redhat.com>
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Diffstat (limited to 'module-common.c')
0 files changed, 0 insertions, 0 deletions