Re: [PATCH 2/2] ata: libata-scsi: Return aborted command when missing sense and result TF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux