pata_arasan_cf: declare/use more local variables in arasan_cf_dma_start()
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Thu, 1 Nov 2012 15:28:36 +0000 (18:28 +0300)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 28 Nov 2012 17:40:07 +0000 (12:40 -0500)
'acdev->qc', 'acdev->qc->ap', and 'acdev->qc->tf' expressions are used multiple
times in this function, so it makes sense to use the local variables for them.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/pata_arasan_cf.c

index 371fd2c698b70ce1b283672c0c2472f8ce6ac263..9764e80f93202bb6d75811885f07bbf98f0f8929 100644 (file)
@@ -674,13 +674,16 @@ void arasan_cf_error_handler(struct ata_port *ap)
 
 static void arasan_cf_dma_start(struct arasan_cf_dev *acdev)
 {
+       struct ata_queued_cmd *qc = acdev->qc;
+       struct ata_port *ap = qc->ap;
+       struct ata_taskfile *tf = &qc->tf;
        u32 xfer_ctr = readl(acdev->vbase + XFER_CTR) & ~XFER_DIR_MASK;
-       u32 write = acdev->qc->tf.flags & ATA_TFLAG_WRITE;
+       u32 write = tf->flags & ATA_TFLAG_WRITE;
 
        xfer_ctr |= write ? XFER_WRITE : XFER_READ;
        writel(xfer_ctr, acdev->vbase + XFER_CTR);
 
-       acdev->qc->ap->ops->sff_exec_command(acdev->qc->ap, &acdev->qc->tf);
+       ap->ops->sff_exec_command(ap, tf);
        ata_sff_queue_work(&acdev->work);
 }