[PATCH v2 15/35] scsi: virtio_scsi: Convert to scsi_exec_req

Mike Christie
2022-09-29T02:57:03Z

scsi_execute* is going to be removed. Convert to scsi_exec_req so
we pass all args in a scsi_exec_args struct.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
---
drivers/scsi/virtio_scsi.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index 00cf6743db8c..c86a3c035374 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -347,9 +347,14 @@ static void virtscsi_rescan_hotunplug(struct virtio_scsi *vscsi)

memset(inq_result, 0, inq_result_len);

- result = scsi_execute_req(sdev, scsi_cmd, DMA_FROM_DEVICE,
- inq_result, inquiry_len, NULL,
- SD_TIMEOUT, SD_MAX_RETRIES, NULL);
+ result = scsi_exec_req(((struct scsi_exec_args) {
+ .sdev = sdev,
+ .cmd = scsi_cmd,
+ .data_dir = DMA_FROM_DEVICE,
+ .buf = inq_result,
+ .buf_len = inquiry_len,
+ .timeout = SD_TIMEOUT,
+ .retries = SD_MAX_RETRIES }));

if (result == 0 && inq_result[0] >> 5) {
/* PQ indicates the LUN is not attached */
--
2.25.1