Bläddra i källkod

ata: remove superfluous casts

Unreferenced casts of void * types are unnecessary so remove them.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Joe Perches 11 år sedan
förälder
incheckning
d5185d655c
4 ändrade filer med 6 tillägg och 10 borttagningar
  1. 1 1
      drivers/ata/libahci.c
  2. 1 1
      drivers/ata/pata_arasan_cf.c
  3. 1 2
      drivers/ata/sata_dwc_460ex.c
  4. 3 6
      drivers/ata/sata_sx4.c

+ 1 - 1
drivers/ata/libahci.c

@@ -1636,7 +1636,7 @@ static void ahci_error_intr(struct ata_port *ap, u32 irq_stat)
 	}
 	}
 
 
 	if (irq_stat & PORT_IRQ_UNK_FIS) {
 	if (irq_stat & PORT_IRQ_UNK_FIS) {
-		u32 *unk = (u32 *)(pp->rx_fis + RX_FIS_UNK);
+		u32 *unk = pp->rx_fis + RX_FIS_UNK;
 
 
 		active_ehi->err_mask |= AC_ERR_HSM;
 		active_ehi->err_mask |= AC_ERR_HSM;
 		active_ehi->action |= ATA_EH_RESET;
 		active_ehi->action |= ATA_EH_RESET;

+ 1 - 1
drivers/ata/pata_arasan_cf.c

@@ -356,7 +356,7 @@ static void cf_exit(struct arasan_cf_dev *acdev)
 
 
 static void dma_callback(void *dev)
 static void dma_callback(void *dev)
 {
 {
-	struct arasan_cf_dev *acdev = (struct arasan_cf_dev *) dev;
+	struct arasan_cf_dev *acdev = dev;
 
 
 	complete(&acdev->dma_completion);
 	complete(&acdev->dma_completion);
 }
 }

+ 1 - 2
drivers/ata/sata_dwc_460ex.c

@@ -461,8 +461,7 @@ static irqreturn_t dma_dwc_interrupt(int irq, void *hsdev_instance)
 	int chan;
 	int chan;
 	u32 tfr_reg, err_reg;
 	u32 tfr_reg, err_reg;
 	unsigned long flags;
 	unsigned long flags;
-	struct sata_dwc_device *hsdev =
-		(struct sata_dwc_device *)hsdev_instance;
+	struct sata_dwc_device *hsdev = hsdev_instance;
 	struct ata_host *host = (struct ata_host *)hsdev->host;
 	struct ata_host *host = (struct ata_host *)hsdev->host;
 	struct ata_port *ap;
 	struct ata_port *ap;
 	struct sata_dwc_device_port *hsdevp;
 	struct sata_dwc_device_port *hsdevp;

+ 3 - 6
drivers/ata/sata_sx4.c

@@ -1020,8 +1020,7 @@ static void pdc20621_get_from_dimm(struct ata_host *host, void *psource,
 	idx++;
 	idx++;
 	dist = ((long) (window_size - (offset + size))) >= 0 ? size :
 	dist = ((long) (window_size - (offset + size))) >= 0 ? size :
 		(long) (window_size - offset);
 		(long) (window_size - offset);
-	memcpy_fromio((char *) psource, (char *) (dimm_mmio + offset / 4),
-		      dist);
+	memcpy_fromio(psource, dimm_mmio + offset / 4, dist);
 
 
 	psource += dist;
 	psource += dist;
 	size -= dist;
 	size -= dist;
@@ -1030,8 +1029,7 @@ static void pdc20621_get_from_dimm(struct ata_host *host, void *psource,
 		readl(mmio + PDC_GENERAL_CTLR);
 		readl(mmio + PDC_GENERAL_CTLR);
 		writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR);
 		writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR);
 		readl(mmio + PDC_DIMM_WINDOW_CTLR);
 		readl(mmio + PDC_DIMM_WINDOW_CTLR);
-		memcpy_fromio((char *) psource, (char *) (dimm_mmio),
-			      window_size / 4);
+		memcpy_fromio(psource, dimm_mmio, window_size / 4);
 		psource += window_size;
 		psource += window_size;
 		size -= window_size;
 		size -= window_size;
 		idx++;
 		idx++;
@@ -1042,8 +1040,7 @@ static void pdc20621_get_from_dimm(struct ata_host *host, void *psource,
 		readl(mmio + PDC_GENERAL_CTLR);
 		readl(mmio + PDC_GENERAL_CTLR);
 		writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR);
 		writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR);
 		readl(mmio + PDC_DIMM_WINDOW_CTLR);
 		readl(mmio + PDC_DIMM_WINDOW_CTLR);
-		memcpy_fromio((char *) psource, (char *) (dimm_mmio),
-			      size / 4);
+		memcpy_fromio(psource, dimm_mmio, size / 4);
 	}
 	}
 }
 }
 #endif
 #endif