Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

libata: cleanup ata_scsi_qc_complete

Remove an incorrect comment and untangle an if statement in
ata_scsi_qc_complete.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Christoph Hellwig and committed by
Tejun Heo
25c7ce7f 8a3e33cf

+5 -14
+5 -14
drivers/ata/libata-scsi.c
··· 1774 1774 * asc,ascq = ATA PASS-THROUGH INFORMATION AVAILABLE 1775 1775 */ 1776 1776 if (((cdb[0] == ATA_16) || (cdb[0] == ATA_12)) && 1777 - ((cdb[2] & 0x20) || need_sense)) { 1777 + ((cdb[2] & 0x20) || need_sense)) 1778 1778 ata_gen_passthru_sense(qc); 1779 - } else { 1780 - if (!need_sense) { 1781 - cmd->result = SAM_STAT_GOOD; 1782 - } else { 1783 - /* TODO: decide which descriptor format to use 1784 - * for 48b LBA devices and call that here 1785 - * instead of the fixed desc, which is only 1786 - * good for smaller LBA (and maybe CHS?) 1787 - * devices. 1788 - */ 1789 - ata_gen_ata_sense(qc); 1790 - } 1791 - } 1779 + else if (need_sense) 1780 + ata_gen_ata_sense(qc); 1781 + else 1782 + cmd->result = SAM_STAT_GOOD; 1792 1783 1793 1784 if (need_sense && !ap->ops->error_handler) 1794 1785 ata_dump_status(ap->print_id, &qc->result_tf);