* Re: [PATCH v2] pata_arasan_cf: declare/use more local variables in arasan_cf_dma_start()
2012-11-01 15:28 [PATCH v2] pata_arasan_cf: declare/use more local variables in arasan_cf_dma_start() Sergei Shtylyov
@ 2012-11-01 14:31 ` viresh kumar
2012-11-28 17:42 ` Jeff Garzik
1 sibling, 0 replies; 3+ messages in thread
From: viresh kumar @ 2012-11-01 14:31 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: linux-ide, jgarzik, spear-devel
On Thu, Nov 1, 2012 at 8:58 PM, Sergei Shtylyov <sshtylyov@ru.mvista.com> wrote:
> '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>
>
> ---
> The patch is atop of the 'upstream' branch of libata-dev.git...
>
> drivers/ata/pata_arasan_cf.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> Index: libata-dev/drivers/ata/pata_arasan_cf.c
> ===================================================================
> --- libata-dev.orig/drivers/ata/pata_arasan_cf.c
> +++ libata-dev/drivers/ata/pata_arasan_cf.c
> @@ -668,13 +668,16 @@ void arasan_cf_error_handler(struct ata_
>
> 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);
Looks fine. Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] pata_arasan_cf: declare/use more local variables in arasan_cf_dma_start()
@ 2012-11-01 15:28 Sergei Shtylyov
2012-11-01 14:31 ` viresh kumar
2012-11-28 17:42 ` Jeff Garzik
0 siblings, 2 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2012-11-01 15:28 UTC (permalink / raw)
To: linux-ide, jgarzik, viresh.linux
'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>
---
The patch is atop of the 'upstream' branch of libata-dev.git...
drivers/ata/pata_arasan_cf.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Index: libata-dev/drivers/ata/pata_arasan_cf.c
===================================================================
--- libata-dev.orig/drivers/ata/pata_arasan_cf.c
+++ libata-dev/drivers/ata/pata_arasan_cf.c
@@ -668,13 +668,16 @@ void arasan_cf_error_handler(struct ata_
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);
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] pata_arasan_cf: declare/use more local variables in arasan_cf_dma_start()
2012-11-01 15:28 [PATCH v2] pata_arasan_cf: declare/use more local variables in arasan_cf_dma_start() Sergei Shtylyov
2012-11-01 14:31 ` viresh kumar
@ 2012-11-28 17:42 ` Jeff Garzik
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2012-11-28 17:42 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: linux-ide, viresh.linux
On 11/01/2012 11:28 AM, Sergei Shtylyov wrote:
> '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>
>
> ---
> The patch is atop of the 'upstream' branch of libata-dev.git...
>
> drivers/ata/pata_arasan_cf.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
applied
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-28 17:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-01 15:28 [PATCH v2] pata_arasan_cf: declare/use more local variables in arasan_cf_dma_start() Sergei Shtylyov
2012-11-01 14:31 ` viresh kumar
2012-11-28 17:42 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).