LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 7/19] au1xxx-ide: remove dead code
Date: Fri, 12 Jan 2007 05:26:52 +0100	[thread overview]
Message-ID: <20070112042652.28794.54747.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20070112042621.28794.6937.sendpatchset@localhost.localdomain>

[PATCH] au1xxx-ide: remove dead code

'speed' is always equal to 'mode' when ide_config_drive_speed() is called

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

---
 drivers/ide/mips/au1xxx-ide.c |   15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

Index: a/drivers/ide/mips/au1xxx-ide.c
===================================================================
--- a.orig/drivers/ide/mips/au1xxx-ide.c
+++ a/drivers/ide/mips/au1xxx-ide.c
@@ -181,12 +181,6 @@ static int auide_tune_chipset (ide_drive
 {
 	int mem_sttime;
 	int mem_stcfg;
-	unsigned long mode;
-
-#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
-	if (ide_use_dma(drive))
-		mode = ide_dma_speed(drive, 0);
-#endif
 
 	mem_sttime = 0;
 	mem_stcfg  = au_readl(MEM_STCFG2);
@@ -195,7 +189,7 @@ static int auide_tune_chipset (ide_drive
 		auide_tune_drive(drive, speed - XFER_PIO_0);
 		return 0;
 	}
-	      
+
 	switch(speed) {
 #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
 	case XFER_MW_DMA_2:
@@ -207,7 +201,6 @@ static int auide_tune_chipset (ide_drive
 		mem_stcfg &= ~TOECS_MASK;
 		mem_stcfg |= SBC_IDE_MDMA2_TCSOE | SBC_IDE_MDMA2_TOECS;
 
-		mode = XFER_MW_DMA_2;
 		break;
 	case XFER_MW_DMA_1:
 		mem_sttime = SBC_IDE_TIMING(MDMA1);
@@ -218,7 +211,6 @@ static int auide_tune_chipset (ide_drive
 		mem_stcfg &= ~TOECS_MASK;
 		mem_stcfg |= SBC_IDE_MDMA1_TCSOE | SBC_IDE_MDMA1_TOECS;
 
-		mode = XFER_MW_DMA_1;
 		break;
 	case XFER_MW_DMA_0:
 		mem_sttime = SBC_IDE_TIMING(MDMA0);
@@ -229,14 +221,13 @@ static int auide_tune_chipset (ide_drive
 		mem_stcfg &= ~TOECS_MASK;
 		mem_stcfg |= SBC_IDE_MDMA0_TCSOE | SBC_IDE_MDMA0_TOECS;
 
-		mode = XFER_MW_DMA_0;
 		break;
 #endif
 	default:
 		return 1;
 	}
-	
-	if (ide_config_drive_speed(drive, mode))
+
+	if (ide_config_drive_speed(drive, speed))
 		return 1;
 
 	au_writel(mem_sttime,MEM_STTIME2);

  parent reply	other threads:[~2007-01-12  4:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-12  4:26 [PATCH 2/19] ide: add it8213 driver Bartlomiej Zolnierkiewicz
2007-01-12  4:26 ` [PATCH 3/19] ide: it8213 driver update Bartlomiej Zolnierkiewicz
2007-01-12  4:26 ` [PATCH 4/19] ia64: add pci_get_legacy_ide_irq() Bartlomiej Zolnierkiewicz
2007-01-12  4:26 ` [PATCH 5/19] ide: add missing __init tags to IDE PCI host drivers Bartlomiej Zolnierkiewicz
2007-01-12  4:26 ` [PATCH 6/19] pdc202xx_old: remove dead code Bartlomiej Zolnierkiewicz
2007-01-12  4:26 ` Bartlomiej Zolnierkiewicz [this message]
2007-01-12  4:26 ` [PATCH 8/19] ide: remove write-only ide_pio_data_t.blacklisted Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 9/19] ide: remove write-only ide_hwif_t.no_dsc flag Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 10/19] trm290: remove redundant CONFIG_BLK_DEV_IDEDMA Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 11/19] ide: remove ide_pci_device_t tables with only one entry Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 12/19] ide: remove ide_drive_t.usage Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 13/19] hpt366: remove redundant check from init_dma_hpt366() Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 14/19] cs5530: small cleanup Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 15/19] svwks: " Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 16/19] sis5513: sis5513_config_xfer_rate() cleanup Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 17/19] ide: unexport ide_set_xfer_rate() Bartlomiej Zolnierkiewicz
2007-01-12  4:28 ` [PATCH 18/19] ide: add ide_use_fast_pio() helper Bartlomiej Zolnierkiewicz
2007-01-12 10:08   ` Alan
2007-01-12 14:00     ` Bartlomiej Zolnierkiewicz
2007-01-12 14:30       ` Alan
2007-01-12 14:43         ` Bartlomiej Zolnierkiewicz
2007-01-12 15:16           ` Alan
2007-01-12 17:24             ` Bartlomiej Zolnierkiewicz
2007-01-12  4:28 ` [PATCH 19/19] ide: use PIO/MMIO operations directly where possible Bartlomiej Zolnierkiewicz
2007-01-12 10:06   ` Alan
2007-01-12 14:19     ` Bartlomiej Zolnierkiewicz
2007-06-21 17:16   ` Sergei Shtylyov
2007-06-21 18:19     ` Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070112042652.28794.54747.sendpatchset@localhost.localdomain \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH 7/19] au1xxx-ide: remove dead code' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).