[07/10] scsi: rename scsi_mq_prep_fn to scsi_prepare_cmd

Message ID 20201005084130.143273-8-hch@lst.de
State New
Headers show
Series
  • [01/10] scsi: don't export scsi_device_from_queue
Related show

Commit Message

Christoph Hellwig Oct. 5, 2020, 8:41 a.m.
The old name is rather confusing now that the the legacy prep_fn is gone.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/scsi/scsi_lib.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Hannes Reinecke Oct. 5, 2020, 9:05 a.m. | #1
On 10/5/20 10:41 AM, Christoph Hellwig wrote:
> The old name is rather confusing now that the the legacy prep_fn is gone.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/scsi/scsi_lib.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index 3940641052f90b..8420e42d618bb0 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -1562,7 +1562,7 @@ static unsigned int scsi_mq_inline_sgl_size(struct Scsi_Host *shost)
>   		sizeof(struct scatterlist);
>   }
>   
> -static blk_status_t scsi_mq_prep_fn(struct request *req)
> +static blk_status_t scsi_prepare_cmd(struct request *req)
>   {
>   	struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(req);
>   	struct scsi_device *sdev = req->q->queuedata;
> @@ -1665,7 +1665,7 @@ static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx,
>   		goto out_dec_target_busy;
>   
>   	if (!(req->rq_flags & RQF_DONTPREP)) {
> -		ret = scsi_mq_prep_fn(req);
> +		ret = scsi_prepare_cmd(req);
>   		if (ret != BLK_STS_OK)
>   			goto out_dec_host_busy;
>   		req->rq_flags |= RQF_DONTPREP;
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes

Patch

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 3940641052f90b..8420e42d618bb0 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1562,7 +1562,7 @@  static unsigned int scsi_mq_inline_sgl_size(struct Scsi_Host *shost)
 		sizeof(struct scatterlist);
 }
 
-static blk_status_t scsi_mq_prep_fn(struct request *req)
+static blk_status_t scsi_prepare_cmd(struct request *req)
 {
 	struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(req);
 	struct scsi_device *sdev = req->q->queuedata;
@@ -1665,7 +1665,7 @@  static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx,
 		goto out_dec_target_busy;
 
 	if (!(req->rq_flags & RQF_DONTPREP)) {
-		ret = scsi_mq_prep_fn(req);
+		ret = scsi_prepare_cmd(req);
 		if (ret != BLK_STS_OK)
 			goto out_dec_host_busy;
 		req->rq_flags |= RQF_DONTPREP;