On 8/3/25 2:49 AM, Igor Pylypiv wrote: >>> There is a redundant check in ata_gen_ata_sense(). qc->err_mask (is_error) is >>> already checked in ata_scsi_qc_complete() before it calls ata_gen_ata_sense(). >>> >>> if (qc->err_mask || >>> tf->status & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { >>> >>> The function will be much cleaner once we remove this check. >> >> Yep, we can remove the err_mask check. >> > > To clarify, I mean that both conditions can be removed, not just the err_mask > check. In the current code the err_mask check always evaluates to true so > the right part of the OR expression is skipped due to lazy evaluation. Yes, we can simplify this. -- Damien Le Moal Western Digital Research