]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sata_sil24: sil24_interrupt() micro-optimisation
authorMikael Pettersson <mikpe@it.uu.se>
Mon, 2 Jul 2007 23:10:25 +0000 (01:10 +0200)
committerJeff Garzik <jeff@garzik.org>
Mon, 9 Jul 2007 16:17:34 +0000 (12:17 -0400)
sil24_interrupt() loads host->ports[i] into a local variable,
validates it, and then loads the value again in the call to
sil24_host_intr(). This patch replaces the second load by a
reference to the local variable.

This is safe since no side-effects have occurred since the
initial load. It also improves readability since it makes
it clear that the parameter to sil24_host_intr() is the same
value which was just validated.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/sata_sil24.c

index 0ddfae9911cdf1aa7c8a98946afcabf84d49bff3..14261f393c67d24a35933e395b27dd02a0aefff5 100644 (file)
@@ -888,7 +888,7 @@ static irqreturn_t sil24_interrupt(int irq, void *dev_instance)
                if (status & (1 << i)) {
                        struct ata_port *ap = host->ports[i];
                        if (ap && !(ap->flags & ATA_FLAG_DISABLED)) {
-                               sil24_host_intr(host->ports[i]);
+                               sil24_host_intr(ap);
                                handled++;
                        } else
                                printk(KERN_ERR DRV_NAME