Skip to contentSkip to conversation

Change type of third __scsi_queue_insert() argument from int into bool

PATCH Applied Bart Van Assche 2 participants 2 messages Jan 10, 2018 – Jan 11, 2018 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Change type of third __scsi_queue_insert() argument from int into bool

This patch does not change any functionality but makes the SCSI core source code slightly easier to read.

Cc Christoph Hellwig <[email protected]>
Cc Hannes Reinecke <[email protected]>
Cc Johannes Thumshirn <[email protected]>
---
 drivers/scsi/scsi_lib.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/scsi_lib.c +4 -4
index 1c4d885a1d9e..dad450ccd57b 100644
@@ -164,7 +164,7 @@ static void scsi_mq_requeue_cmd(struct scsi_cmnd *cmd)
  * for a requeue after completion, which should only occur in this
  * file.
  */
-static void __scsi_queue_insert(struct scsi_cmnd *cmd, int reason, int unbusy)
+static void __scsi_queue_insert(struct scsi_cmnd *cmd, int reason, bool unbusy)
 {
 	struct scsi_device *device = cmd->device;
 	struct request_queue *q = device->request_queue;
@@ -220,7 +220,7 @@ static void __scsi_queue_insert(struct scsi_cmnd *cmd, int reason, int unbusy)
  */
 void scsi_queue_insert(struct scsi_cmnd *cmd, int reason)
 {
-	__scsi_queue_insert(cmd, reason, 1);
+	__scsi_queue_insert(cmd, reason, true);
 }
 
 
@@ -1015,11 +1015,11 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
 		break;
 	case ACTION_RETRY:
 		/* Retry the same command immediately */
-		__scsi_queue_insert(cmd, SCSI_MLQUEUE_EH_RETRY, 0);
+		__scsi_queue_insert(cmd, SCSI_MLQUEUE_EH_RETRY, false);
 		break;
 	case ACTION_DELAYED_RETRY:
 		/* Retry the same command after a delay */
-		__scsi_queue_insert(cmd, SCSI_MLQUEUE_DEVICE_BUSY, 0);
+		__scsi_queue_insert(cmd, SCSI_MLQUEUE_DEVICE_BUSY, false);
 		break;
 	}
 }
Signature · 1 line
2.15.1
#1 lore raw

Bart,

Quoted 2 lines

This patch does not change any functionality but makes the SCSI core source code slightly easier to read.

Applied to 4.16/scsi-queue.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering