[06/10] scsi: rename scsi_prep_state_check to scsi_device_state_check

Message ID 20201005084130.143273-7-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:04 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 670ad06812b419..3940641052f90b 100644

> --- a/drivers/scsi/scsi_lib.c

> +++ b/drivers/scsi/scsi_lib.c

> @@ -1214,7 +1214,7 @@ static blk_status_t scsi_setup_cmnd(struct scsi_device *sdev,

>   }

>   

>   static blk_status_t

> -scsi_prep_state_check(struct scsi_device *sdev, struct request *req)

> +scsi_device_state_check(struct scsi_device *sdev, struct request *req)

>   {

>   	switch (sdev->sdev_state) {

>   	case SDEV_OFFLINE:

> @@ -1653,7 +1653,7 @@ static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx,

>   	 * commands.

>   	 */

>   	if (unlikely(sdev->sdev_state != SDEV_RUNNING)) {

> -		ret = scsi_prep_state_check(sdev, req);

> +		ret = scsi_device_state_check(sdev, req);

>   		if (ret != BLK_STS_OK)

>   			goto out_put_budget;

>   	}

> 

Reviewed-by: Hannes Reinecke <hare@suse.de>


Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

Patch

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 670ad06812b419..3940641052f90b 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1214,7 +1214,7 @@  static blk_status_t scsi_setup_cmnd(struct scsi_device *sdev,
 }
 
 static blk_status_t
-scsi_prep_state_check(struct scsi_device *sdev, struct request *req)
+scsi_device_state_check(struct scsi_device *sdev, struct request *req)
 {
 	switch (sdev->sdev_state) {
 	case SDEV_OFFLINE:
@@ -1653,7 +1653,7 @@  static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx,
 	 * commands.
 	 */
 	if (unlikely(sdev->sdev_state != SDEV_RUNNING)) {
-		ret = scsi_prep_state_check(sdev, req);
+		ret = scsi_device_state_check(sdev, req);
 		if (ret != BLK_STS_OK)
 			goto out_put_budget;
 	}