Linux ATA/IDE development
 help / color / mirror / Atom feed
* [PATCH] ata: sata_highbank: remove superfluous cast
@ 2014-03-26 15:41 Bartlomiej Zolnierkiewicz
  2014-03-26 15:42 ` Tejun Heo
  0 siblings, 1 reply; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2014-03-26 15:41 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Mark Langsdorf, Rob Herring, linux-ide, linux-arm-kernel,
	linux-kernel

hpriv->plat_data is 'void *' so there is no need to cast it to
'struct ecx_plat_data *'.

Cc: Mark Langsdorf <mark.langsdorf@calxeda.com>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/ata/sata_highbank.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/drivers/ata/sata_highbank.c
===================================================================
--- a/drivers/ata/sata_highbank.c	2014-03-14 16:45:04.384724376 +0100
+++ b/drivers/ata/sata_highbank.c	2014-03-26 16:28:40.927062349 +0100
@@ -141,7 +141,7 @@ static ssize_t ecx_transmit_led_message(
 					ssize_t size)
 {
 	struct ahci_host_priv *hpriv =  ap->host->private_data;
-	struct ecx_plat_data *pdata = (struct ecx_plat_data *) hpriv->plat_data;
+	struct ecx_plat_data *pdata = hpriv->plat_data;
 	struct ahci_port_priv *pp = ap->private_data;
 	unsigned long flags;
 	int pmp, i;


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ata: sata_highbank: remove superfluous cast
  2014-03-26 15:41 [PATCH] ata: sata_highbank: remove superfluous cast Bartlomiej Zolnierkiewicz
@ 2014-03-26 15:42 ` Tejun Heo
  2014-03-26 16:34   ` [PATCH] ata: remove superfluous casts Joe Perches
  0 siblings, 1 reply; 4+ messages in thread
From: Tejun Heo @ 2014-03-26 15:42 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Mark Langsdorf, Rob Herring, linux-ide, linux-arm-kernel,
	linux-kernel

On Wed, Mar 26, 2014 at 04:41:00PM +0100, Bartlomiej Zolnierkiewicz wrote:
> hpriv->plat_data is 'void *' so there is no need to cast it to
> 'struct ecx_plat_data *'.
> 
> Cc: Mark Langsdorf <mark.langsdorf@calxeda.com>
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Applied to libata/for-3.15.  Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] ata: remove superfluous casts
  2014-03-26 15:42 ` Tejun Heo
@ 2014-03-26 16:34   ` Joe Perches
  2014-03-26 16:38     ` Tejun Heo
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2014-03-26 16:34 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide, linux-kernel, Bartlomiej Zolnierkiewicz

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

Signed-off-by: Joe Perches <joe@perches.com>
---

Done with coccinelle

 drivers/ata/libahci.c        | 2 +-
 drivers/ata/pata_arasan_cf.c | 2 +-
 drivers/ata/sata_dwc_460ex.c | 3 +--
 drivers/ata/sata_sx4.c       | 9 +++------
 4 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 7985ae7..6bd4f66 100644
--- a/drivers/ata/libahci.c
+++ b/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) {
-		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->action |= ATA_EH_RESET;
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index 73492dd..6fac524 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/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)
 {
-	struct arasan_cf_dev *acdev = (struct arasan_cf_dev *) dev;
+	struct arasan_cf_dev *acdev = dev;
 
 	complete(&acdev->dma_completion);
 }
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
index 73510d0..0bb2cab 100644
--- a/drivers/ata/sata_dwc_460ex.c
+++ b/drivers/ata/sata_dwc_460ex.c
@@ -461,8 +461,7 @@ static irqreturn_t dma_dwc_interrupt(int irq, void *hsdev_instance)
 	int chan;
 	u32 tfr_reg, err_reg;
 	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_port *ap;
 	struct sata_dwc_device_port *hsdevp;
diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c
index 6cd0312..39b5de6 100644
--- a/drivers/ata/sata_sx4.c
+++ b/drivers/ata/sata_sx4.c
@@ -1020,8 +1020,7 @@ static void pdc20621_get_from_dimm(struct ata_host *host, void *psource,
 	idx++;
 	dist = ((long) (window_size - (offset + size))) >= 0 ? size :
 		(long) (window_size - offset);
-	memcpy_fromio((char *) psource, (char *) (dimm_mmio + offset / 4),
-		      dist);
+	memcpy_fromio(psource, dimm_mmio + offset / 4, dist);
 
 	psource += dist;
 	size -= dist;
@@ -1030,8 +1029,7 @@ static void pdc20621_get_from_dimm(struct ata_host *host, void *psource,
 		readl(mmio + PDC_GENERAL_CTLR);
 		writel(((idx) << page_mask), 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;
 		size -= window_size;
 		idx++;
@@ -1042,8 +1040,7 @@ static void pdc20621_get_from_dimm(struct ata_host *host, void *psource,
 		readl(mmio + PDC_GENERAL_CTLR);
 		writel(((idx) << page_mask), 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ata: remove superfluous casts
  2014-03-26 16:34   ` [PATCH] ata: remove superfluous casts Joe Perches
@ 2014-03-26 16:38     ` Tejun Heo
  0 siblings, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2014-03-26 16:38 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-ide, linux-kernel, Bartlomiej Zolnierkiewicz

On Wed, Mar 26, 2014 at 09:34:49AM -0700, Joe Perches wrote:
> Unreferenced casts of void * types are unnecessary so remove them.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied to libata/for-3.15.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-03-26 16:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-26 15:41 [PATCH] ata: sata_highbank: remove superfluous cast Bartlomiej Zolnierkiewicz
2014-03-26 15:42 ` Tejun Heo
2014-03-26 16:34   ` [PATCH] ata: remove superfluous casts Joe Perches
2014-03-26 16:38     ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox