Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
---
hw/scsi/spapr_vscsi.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c
index b4c8f94d22a..5938a392b95 100644
--- a/hw/scsi/spapr_vscsi.c
+++ b/hw/scsi/spapr_vscsi.c
@@ -629,12 +629,11 @@ static void vscsi_save_request(QEMUFile *f, SCSIRequest
*sreq)
{
vscsi_req *req = sreq->hba_private;
Error *local_err = NULL;
- int rc;
assert(req->active);
- rc = vmstate_save_state(f, &vmstate_spapr_vscsi_req, req, NULL,
&local_err);
- if (rc < 0) {
+ if (!vmstate_save_vmsd(f, &vmstate_spapr_vscsi_req, req, NULL,
+ &local_err)) {
error_report_err(local_err);
return;
}
@@ -647,7 +646,6 @@ static void *vscsi_load_request(QEMUFile *f, SCSIRequest
*sreq)
SCSIBus *bus = sreq->bus;
VSCSIState *s = VIO_SPAPR_VSCSI_DEVICE(bus->qbus.parent);
vscsi_req *req;
- int rc;
Error *local_err = NULL;
assert(sreq->tag < VSCSI_REQ_LIMIT);
@@ -655,8 +653,7 @@ static void *vscsi_load_request(QEMUFile *f, SCSIRequest
*sreq)
assert(!req->active);
memset(req, 0, sizeof(*req));
- rc = vmstate_load_state(f, &vmstate_spapr_vscsi_req, req, 1, &local_err);
- if (rc) {
+ if (!vmstate_load_vmsd(f, &vmstate_spapr_vscsi_req, req, 1, &local_err)) {
fprintf(stderr, "VSCSI: failed loading request tag#%u\n", sreq->tag);
error_report_err(local_err);
return NULL;
--
2.43.0