mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
scsi: ipr: Simplify ipr_eh_abort()
Derive the SCSI host pointer once instead of three times. This was detected by Sashiko. No functionality has been changed. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/8427eb7fc8e7c97cf115b9bfff27ed84c35c8bf4.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
This commit is contained in:
parent
fc4f84fdc5
commit
2a0cb1a242
|
|
@ -5299,17 +5299,17 @@ static int ipr_scan_finished(struct Scsi_Host *shost, unsigned long elapsed_time
|
|||
**/
|
||||
static int ipr_eh_abort(struct scsi_cmnd *scsi_cmd)
|
||||
{
|
||||
struct Scsi_Host *host = scsi_cmd->device->host;
|
||||
struct ipr_ioa_cfg *ioa_cfg = (void *)host->hostdata;
|
||||
unsigned long flags;
|
||||
int rc;
|
||||
struct ipr_ioa_cfg *ioa_cfg;
|
||||
|
||||
ENTER;
|
||||
|
||||
ioa_cfg = (struct ipr_ioa_cfg *) scsi_cmd->device->host->hostdata;
|
||||
|
||||
spin_lock_irqsave(&scsi_cmd->device->host->host_lock, flags);
|
||||
spin_lock_irqsave(&host->host_lock, flags);
|
||||
rc = ipr_cancel_op(scsi_cmd);
|
||||
spin_unlock_irqrestore(&scsi_cmd->device->host->host_lock, flags);
|
||||
spin_unlock_irqrestore(&host->host_lock, flags);
|
||||
|
||||
if (rc == SUCCESS)
|
||||
rc = ipr_wait_for_ops(ioa_cfg, scsi_cmd->device, ipr_match_lun);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user