From patchwork Thu Nov 1 15:28:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 196227 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 6F9D92C0321 for ; Fri, 2 Nov 2012 01:30:51 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761486Ab2KAOat (ORCPT ); Thu, 1 Nov 2012 10:30:49 -0400 Received: from mail.dev.rtsoft.ru ([213.79.90.226]:50755 "EHLO wasted.dev.rtsoft.ru" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1761388Ab2KAOat (ORCPT ); Thu, 1 Nov 2012 10:30:49 -0400 Received: from wasted.dev.rtsoft.ru (localhost.localdomain [127.0.0.1]) by wasted.dev.rtsoft.ru (8.14.4/8.14.4) with ESMTP id qA1FSccF012276; Thu, 1 Nov 2012 18:28:38 +0300 Received: (from headless@localhost) by wasted.dev.rtsoft.ru (8.14.4/8.14.4/Submit) id qA1FSafW012274; Thu, 1 Nov 2012 18:28:36 +0300 X-Authentication-Warning: wasted.dev.rtsoft.ru: headless set sender to sshtylyov@ru.mvista.com using -f To: linux-ide@vger.kernel.org, jgarzik@pobox.com, viresh.linux@gmail.com Subject: [PATCH v2] pata_arasan_cf: declare/use more local variables in arasan_cf_dma_start() From: Sergei Shtylyov Organization: MontaVista Software LLC Date: Thu, 1 Nov 2012 18:28:36 +0300 MIME-Version: 1.0 Message-Id: <201211011828.36550.sshtylyov@ru.mvista.com> Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org '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 Acked-by: Viresh Kumar --- 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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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); }