scsi: libsas: make use of ata_port_is_frozen() helper
authorNiklas Cassel <niklas.cassel@wdc.com>
Fri, 7 Oct 2022 13:23:39 +0000 (15:23 +0200)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Wed, 19 Oct 2022 04:46:00 +0000 (13:46 +0900)
Clean up the code by making use of the newly introduced
ata_port_is_frozen() helper function.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: John Garry <john.garry@huawei.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
drivers/scsi/libsas/sas_ata.c

index d35c929..5692577 100644 (file)
@@ -101,7 +101,7 @@ static void sas_ata_task_done(struct sas_task *task)
 
        spin_lock_irqsave(ap->lock, flags);
        /* check if we lost the race with libata/sas_ata_post_internal() */
-       if (unlikely(ap->pflags & ATA_PFLAG_FROZEN)) {
+       if (unlikely(ata_port_is_frozen(ap))) {
                spin_unlock_irqrestore(ap->lock, flags);
                if (qc->scsicmd)
                        goto qc_already_gone;