[PATCH v2 07/35] scsi: ch: Convert to scsi_exec_req

Mike Christie
2022-09-29T02:54:42Z

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/ch.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index 7ab29eaec6f3..511df7a64a74 100644
--- a/drivers/scsi/ch.c
+++ b/drivers/scsi/ch.c
@@ -195,9 +195,15 @@ ch_do_scsi(scsi_changer *ch, unsigned char *cmd, int cmd_len,

retry:
errno = 0;
- result = scsi_execute_req(ch->device, cmd, direction, buffer,
- buflength, &sshdr, timeout * HZ,
- MAX_RETRIES, NULL);
+ result = scsi_exec_req(((struct scsi_exec_args) {
+ .sdev = ch->device,
+ .cmd = cmd,
+ .data_dir = direction,
+ .buf = buffer,
+ .buf_len = buflength,
+ .sshdr = &sshdr,
+ .timeout = timeout * HZ,
+ .retries = MAX_RETRIES }));
if (result < 0)
return result;
if (scsi_sense_valid(&sshdr)) {
--
2.25.1