Skip to content

Commit c5ace19

Browse files
mikechristiemstsirkin
authored andcommitted
vhost-scsi: Rename vhost_scsi_iov_to_sgl
Rename vhost_scsi_iov_to_sgl to vhost_scsi_map_iov_to_sgl so it matches matches the naming style used for vhost_scsi_copy_iov_to_sgl. Signed-off-by: Mike Christie <michael.christie@oracle.com> Message-Id: <20230709202859.138387-3-michael.christie@oracle.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
1 parent 5ced58b commit c5ace19

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

drivers/vhost/scsi.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -780,8 +780,8 @@ vhost_scsi_copy_iov_to_sgl(struct vhost_scsi_cmd *cmd, struct iov_iter *iter,
780780
}
781781

782782
static int
783-
vhost_scsi_iov_to_sgl(struct vhost_scsi_cmd *cmd, struct iov_iter *iter,
784-
struct scatterlist *sg, int sg_count, bool is_prot)
783+
vhost_scsi_map_iov_to_sgl(struct vhost_scsi_cmd *cmd, struct iov_iter *iter,
784+
struct scatterlist *sg, int sg_count, bool is_prot)
785785
{
786786
struct scatterlist *p = sg;
787787
size_t revert_bytes;
@@ -829,8 +829,9 @@ vhost_scsi_mapal(struct vhost_scsi_cmd *cmd,
829829
pr_debug("%s prot_sg %p prot_sgl_count %u\n", __func__,
830830
cmd->tvc_prot_sgl, cmd->tvc_prot_sgl_count);
831831

832-
ret = vhost_scsi_iov_to_sgl(cmd, prot_iter, cmd->tvc_prot_sgl,
833-
cmd->tvc_prot_sgl_count, true);
832+
ret = vhost_scsi_map_iov_to_sgl(cmd, prot_iter,
833+
cmd->tvc_prot_sgl,
834+
cmd->tvc_prot_sgl_count, true);
834835
if (ret < 0) {
835836
cmd->tvc_prot_sgl_count = 0;
836837
return ret;
@@ -846,8 +847,8 @@ vhost_scsi_mapal(struct vhost_scsi_cmd *cmd,
846847
pr_debug("%s data_sg %p data_sgl_count %u\n", __func__,
847848
cmd->tvc_sgl, cmd->tvc_sgl_count);
848849

849-
ret = vhost_scsi_iov_to_sgl(cmd, data_iter, cmd->tvc_sgl,
850-
cmd->tvc_sgl_count, false);
850+
ret = vhost_scsi_map_iov_to_sgl(cmd, data_iter, cmd->tvc_sgl,
851+
cmd->tvc_sgl_count, false);
851852
if (ret == -EINVAL) {
852853
sg_init_table(cmd->tvc_sgl, cmd->tvc_sgl_count);
853854
ret = vhost_scsi_copy_iov_to_sgl(cmd, data_iter, cmd->tvc_sgl,

0 commit comments

Comments
 (0)