diff mbox series

[3/4] scsi: libsas: make use of ata_port_is_frozen() helper

Message ID 20221007132342.1590367-4-niklas.cassel@wdc.com (mailing list archive)
State Not Applicable
Headers show
Series libata: misc frozen port cleanups | expand

Commit Message

Niklas Cassel Oct. 7, 2022, 1:23 p.m. UTC
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>
---
 drivers/scsi/libsas/sas_ata.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

John Garry Oct. 10, 2022, 8:03 a.m. UTC | #1
On 07/10/2022 14:23, Niklas Cassel wrote:
> 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>
Damien Le Moal Oct. 17, 2022, 3:08 a.m. UTC | #2
On 10/10/22 17:03, John Garry wrote:
> On 07/10/2022 14:23, Niklas Cassel wrote:
>> 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>

Martin,

I can take this one through the libata tree as that would avoid test build
errors. If you agree, can you send your ack please ?
Martin K. Petersen Oct. 18, 2022, 1:33 a.m. UTC | #3
Damien,

> I can take this one through the libata tree as that would avoid test
> build errors. If you agree, can you send your ack please ?

Yes, that's fine.

Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
diff mbox series

Patch

diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index d35c9296f738..5692577f82e3 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -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;