diff options
author | Sumit Saxena <sumit.saxena@avagotech.com> | 2016-01-28 21:04:29 +0530 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-02-23 21:27:02 -0500 |
commit | f9a9dee6a1fd8570884a0ab6f19c6b5cca05bd49 (patch) | |
tree | fa75811274824f703dc1a790603f39d026f05562 /drivers/scsi/megaraid/megaraid_sas_base.c | |
parent | 179ac14291a0e1cf8c2b2dfedce7c5af66696cc9 (diff) | |
download | blackbird-op-linux-f9a9dee6a1fd8570884a0ab6f19c6b5cca05bd49.tar.gz blackbird-op-linux-f9a9dee6a1fd8570884a0ab6f19c6b5cca05bd49.zip |
megaraid_sas: Code optimization build_and_issue_cmd return-type
build_and_issue_cmd should return SCSI_MLQUEUE_HOST_BUSY for a few error
cases instead of returning 1.
Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas_base.c')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 8df58c2b08ec..edf8911bdb12 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -1636,7 +1636,7 @@ megasas_build_and_issue_cmd(struct megasas_instance *instance, return 0; out_return_cmd: megasas_return_cmd(instance, cmd); - return 1; + return SCSI_MLQUEUE_HOST_BUSY; } @@ -1728,12 +1728,7 @@ megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd) break; } - if (instance->instancet->build_and_issue_cmd(instance, scmd)) { - dev_err(&instance->pdev->dev, "Err returned from build_and_issue_cmd\n"); - return SCSI_MLQUEUE_HOST_BUSY; - } - - return 0; + return instance->instancet->build_and_issue_cmd(instance, scmd); out_done: scmd->scsi_done(scmd); |