Skip to contentSkip to conversation

irda: vlsi_ir: Remove casting the return value which is a void pointer

PATCH Applied Jingoo Han 2 participants 2 messages Sep 9, 2013 – Sep 11, 2013

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 2/2 irda: vlsi_ir: Remove casting the return value which is a void pointer

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.

---
 drivers/net/irda/vlsi_ir.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/irda/vlsi_ir.c +1 -1
index 5f47584..c5bd58b 100644
@@ -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);
Signature · 1 line
1.7.10.4
maintainer Applied
#1 lore raw

From: Jingoo Han <[email protected]>
Date: Mon, 09 Sep 2013 14:24:24 +0900

Quoted 5 lines

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.

Applied.