Patchwork [2/2] irda: vlsi_ir: Remove casting the return value which is a void pointer

login
register
mail settings
Submitter Jingoo Han
Date Sept. 9, 2013, 5:24 a.m.
Message ID <004c01cead1c$d899f120$89cdd360$%han@samsung.com>
Download mbox | patch
Permalink /patch/273484/
State Accepted
Delegated to: David Miller
Headers show

Comments

Jingoo Han - Sept. 9, 2013, 5:24 a.m.
Casting the return value which is a void pointer is redundant.
The conversion from void pointer to any other pointer type is
guaranteed by the C programming language.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/net/irda/vlsi_ir.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
David Miller - Sept. 11, 2013, 8:13 p.m.
From: Jingoo Han <jg1.han@samsung.com>
Date: Mon, 09 Sep 2013 14:24:24 +0900

> Casting the return value which is a void pointer is redundant.
> The conversion from void pointer to any other pointer type is
> guaranteed by the C programming language.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c
index 5f47584..c5bd58b 100644
--- a/drivers/net/irda/vlsi_ir.c
+++ b/drivers/net/irda/vlsi_ir.c
@@ -543,7 +543,7 @@  static int vlsi_process_rx(struct vlsi_ring *r, struct ring_descr *rd)
 	int		crclen, len = 0;
 	struct sk_buff	*skb;
 	int		ret = 0;
-	struct net_device *ndev = (struct net_device *)pci_get_drvdata(r->pdev);
+	struct net_device *ndev = pci_get_drvdata(r->pdev);
 	vlsi_irda_dev_t *idev = netdev_priv(ndev);
 
 	pci_dma_sync_single_for_cpu(r->pdev, rd_get_addr(rd), r->len, r->dir);