Commit d88ec2e5 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik

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: default avatarTejun Heo <tj@kernel.org>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 88e8201e
...@@ -1770,18 +1770,15 @@ irqreturn_t ata_sff_interrupt(int irq, void *dev_instance) ...@@ -1770,18 +1770,15 @@ irqreturn_t ata_sff_interrupt(int irq, void *dev_instance)
spin_lock_irqsave(&host->lock, flags); spin_lock_irqsave(&host->lock, flags);
for (i = 0; i < host->n_ports; i++) { for (i = 0; i < host->n_ports; i++) {
struct ata_port *ap; struct ata_port *ap = host->ports[i];
struct ata_queued_cmd *qc;
ap = host->ports[i]; if (unlikely(ap->flags & ATA_FLAG_DISABLED))
if (ap && continue;
!(ap->flags & ATA_FLAG_DISABLED)) {
struct ata_queued_cmd *qc;
qc = ata_qc_from_tag(ap, ap->link.active_tag); qc = ata_qc_from_tag(ap, ap->link.active_tag);
if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING)) && if (qc && !(qc->tf.flags & ATA_TFLAG_POLLING))
(qc->flags & ATA_QCFLAG_ACTIVE)) handled |= ata_sff_host_intr(ap, qc);
handled |= ata_sff_host_intr(ap, qc);
}
} }
spin_unlock_irqrestore(&host->lock, flags); spin_unlock_irqrestore(&host->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment