aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorMikael Pettersson <mikpe@it.uu.se>2007-07-02 19:10:25 -0400
committerJeff Garzik <jeff@garzik.org>2007-07-09 12:17:34 -0400
commit825cd6dd793770ebd42d9ca19f5ee7d082350317 (patch)
tree7d5c74490aab35cc2d6d505cd310d265d56e5604 /drivers/ata
parent5f45bc50976ee1f408f7171af155aec646655a37 (diff)
sata_sil24: sil24_interrupt() micro-optimisation
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>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/sata_sil24.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index 0ddfae9911cd..14261f393c67 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -888,7 +888,7 @@ static irqreturn_t sil24_interrupt(int irq, void *dev_instance)
888 if (status & (1 << i)) { 888 if (status & (1 << i)) {
889 struct ata_port *ap = host->ports[i]; 889 struct ata_port *ap = host->ports[i];
890 if (ap && !(ap->flags & ATA_FLAG_DISABLED)) { 890 if (ap && !(ap->flags & ATA_FLAG_DISABLED)) {
891 sil24_host_intr(host->ports[i]); 891 sil24_host_intr(ap);
892 handled++; 892 handled++;
893 } else 893 } else
894 printk(KERN_ERR DRV_NAME 894 printk(KERN_ERR DRV_NAME