diff options
author | Tejun Heo <tj@kernel.org> | 2010-01-18 20:46:32 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2010-03-01 14:58:44 -0500 |
commit | d88ec2e5c13261cf317b46832a7de216f6d06537 (patch) | |
tree | da307bdad7bfa99c87857ac228896696170bb06f /drivers/ata | |
parent | 88e8201e67aace3d86de9e75122ea525f0e7248e (diff) |
libata: cleanup ata_sff_interrupt()
host->ports[i] is never NULL if i < host->n_ports and non-NULL return
from ata_qc_from_tag() guarantees that the returned qc is active.
Drop unnecessary tests.
Superflous () dropped as suggested by Sergei.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-sff.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 730ef3c384ca..c62ed13b0596 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -1770,18 +1770,15 @@ irqreturn_t ata_sff_interrupt(int irq, void *dev_instance) | |||
1770 | spin_lock_irqsave(&host->lock, flags); | 1770 | spin_lock_irqsave(&host->lock, flags); |
1771 | 1771 | ||
1772 | for (i = 0; i < host->n_ports; i++) { | 1772 | for (i = 0; i < host->n_ports; i++) { |
1773 | struct ata_port *ap; | 1773 | struct ata_port *ap = host->ports[i]; |
1774 | struct ata_queued_cmd *qc; | ||
1774 | 1775 | ||
1775 | ap = host->ports[i]; | 1776 | if (unlikely(ap->flags & ATA_FLAG_DISABLED)) |
1776 | if (ap && | 1777 | continue; |
1777 | !(ap->flags & ATA_FLAG_DISABLED)) { | ||
1778 | struct ata_queued_cmd *qc; | ||
1779 | 1778 | ||
1780 | qc = ata_qc_from_tag(ap, ap->link.active_tag); | 1779 | qc = ata_qc_from_tag(ap, ap->link.active_tag); |
1781 | if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING)) && | 1780 | if (qc && !(qc->tf.flags & ATA_TFLAG_POLLING)) |
1782 | (qc->flags & ATA_QCFLAG_ACTIVE)) | 1781 | handled |= ata_sff_host_intr(ap, qc); |
1783 | handled |= ata_sff_host_intr(ap, qc); | ||
1784 | } | ||
1785 | } | 1782 | } |
1786 | 1783 | ||
1787 | spin_unlock_irqrestore(&host->lock, flags); | 1784 | spin_unlock_irqrestore(&host->lock, flags); |