Skip to content

Commit 0dd0357

Browse files
damien-lemoalmartinkpetersen
authored andcommitted
scsi: libsas: Simplify sas_ata_wait_eh()
Simplify the code of sas_ata_wait_eh(), removing the local variable ap for the pointer to the device ata_port structure. The test using dev_is_sata() is also removed as all call sites of this function check if the device is a SATA one before calling this function. Signed-off-by: Damien Le Moal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: John Garry <[email protected]> Reviewed-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 54091ee commit 0dd0357

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

drivers/scsi/libsas/sas_ata.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -927,13 +927,7 @@ EXPORT_SYMBOL_GPL(sas_ata_schedule_reset);
927927

928928
void sas_ata_wait_eh(struct domain_device *dev)
929929
{
930-
struct ata_port *ap;
931-
932-
if (!dev_is_sata(dev))
933-
return;
934-
935-
ap = dev->sata_dev.ap;
936-
ata_port_wait_eh(ap);
930+
ata_port_wait_eh(dev->sata_dev.ap);
937931
}
938932

939933
void sas_ata_device_link_abort(struct domain_device *device, bool force_reset)

0 commit comments

Comments
 (0)