diff options
author | Kevin Barnett <kevin.barnett@microchip.com> | 2022-02-01 15:48:18 -0600 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-02-07 23:38:34 -0500 |
commit | b4dc06a9070e3ca9d18a33fe649df594832dde1a (patch) | |
tree | 58ed9fb06c46e7964251fba80372ea8fb508e392 /drivers/scsi/smartpqi | |
parent | 94a68c814328836d022d1e7ced1b762834917bd2 (diff) | |
download | linux-stable-b4dc06a9070e3ca9d18a33fe649df594832dde1a.tar.gz linux-stable-b4dc06a9070e3ca9d18a33fe649df594832dde1a.tar.bz2 linux-stable-b4dc06a9070e3ca9d18a33fe649df594832dde1a.zip |
scsi: smartpqi: Fix a name typo and cleanup code
Rename the function pqi_is_io_high_priority() to pqi_is_io_high_priority().
Remove 2 unnecessary lines from the function, and adjusted the white space.
Link: https://lore.kernel.org/r/164375209818.440833.10908948825731635853.stgit@brunhilda.pdev.net
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com>
Reviewed-by: Scott Benesh <scott.benesh@microchip.com>
Reviewed-by: Scott Teel <scott.teel@microchip.com>
Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/smartpqi')
-rw-r--r-- | drivers/scsi/smartpqi/smartpqi_init.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 9bc2987e280f..8ff38e3ecd09 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -5581,18 +5581,19 @@ static void pqi_aio_io_complete(struct pqi_io_request *io_request, pqi_scsi_done(scmd); } -static inline bool pqi_is_io_high_prioity(struct pqi_ctrl_info *ctrl_info, +static inline bool pqi_is_io_high_priority(struct pqi_ctrl_info *ctrl_info, struct pqi_scsi_dev *device, struct scsi_cmnd *scmd) { bool io_high_prio; int priority_class; io_high_prio = false; + if (device->ncq_prio_enable) { priority_class = IOPRIO_PRIO_CLASS(req_get_ioprio(scsi_cmd_to_rq(scmd))); if (priority_class == IOPRIO_CLASS_RT) { - /* set NCQ priority for read/write command */ + /* Set NCQ priority for read/write commands. */ switch (scmd->cmnd[0]) { case WRITE_16: case READ_16: @@ -5604,8 +5605,6 @@ static inline bool pqi_is_io_high_prioity(struct pqi_ctrl_info *ctrl_info, case READ_6: io_high_prio = true; break; - default: - break; } } } @@ -5619,7 +5618,8 @@ static inline int pqi_aio_submit_scsi_cmd(struct pqi_ctrl_info *ctrl_info, { bool io_high_prio; - io_high_prio = pqi_is_io_high_prioity(ctrl_info, device, scmd); + io_high_prio = pqi_is_io_high_priority(ctrl_info, device, scmd); + return pqi_aio_submit_io(ctrl_info, scmd, device->aio_handle, scmd->cmnd, scmd->cmd_len, queue_group, NULL, false, io_high_prio); |