@samitouri / QOSamiQemu / commits / 1afc7da7db

hw/scsi/disk: Prefer target_s390x() over qemu_arch_available()

qemu_arch_available() is used to check if a broadly available feature should be exposed to a particular set of target architectures. Here we only want to check something that is specific to s390x: the target_s390x() helper is more adapted. Besides, it will allow to reduce qemu_arch_available() scope. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20260213175032.32121-4-philmd@linaro.org>

Philippe Mathieu-Daudé committed Feb 13, 2026 at 14:50 UTC 1afc7da7dbc3f4c3b8cf310ff30a08f6f02587c8
1 file changed +2 -2
hw/scsi/scsi-disk.c
+2 -2
@@ -27,13 +27,13 @@
27 #include "qemu/module.h"
28 #include "qemu/hw-version.h"
29 #include "qemu/memalign.h"
30 +#include "qemu/target-info.h"
31 #include "hw/scsi/scsi.h"
32 #include "migration/misc.h"
33 #include "migration/qemu-file-types.h"
34 #include "migration/vmstate.h"
35 #include "hw/scsi/emulation.h"
36 #include "scsi/constants.h"
36 -#include "system/arch_init.h"
37 #include "system/block-backend.h"
38 #include "system/blockdev.h"
39 #include "hw/block/block.h"
@@ -3180,7 +3180,7 @@ static void scsi_property_add_specifics(DeviceClass *dc)
3180 ObjectClass *oc = OBJECT_CLASS(dc);
3181
3182 /* The loadparm property is only supported on s390x */
3183 - if (qemu_arch_available(QEMU_ARCH_S390X)) {
3183 + if (target_s390x()) {
3184 object_class_property_add_str(oc, "loadparm",
3185 scsi_property_get_loadparm,
3186 scsi_property_set_loadparm);