Skip to contentSkip to conversation

s5p-g2d: Remove casting the return value which is a void pointer

PATCH Superseded Jingoo Han 1 participant 5 messages Sep 9, 2013

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/5 s5p-g2d: 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/media/platform/s5p-g2d/g2d.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/s5p-g2d/g2d.c +1 -1
index fd6289d..0b29483 100644
@@ -840,7 +840,7 @@ put_clk:
 
 static int g2d_remove(struct platform_device *pdev)
 {
-	struct g2d_dev *dev = (struct g2d_dev *)platform_get_drvdata(pdev);
+	struct g2d_dev *dev = platform_get_drvdata(pdev);
 
 	v4l2_info(&dev->v4l2_dev, "Removing " G2D_NAME);
 	v4l2_m2m_release(dev->m2m_dev);
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH 2/5 m2m-deinterlace: 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/media/platform/m2m-deinterlace.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/platform/m2m-deinterlace.c +1 -2
index 540516c..36513e8 100644
@@ -1084,8 +1084,7 @@ free_dev:
 
 static int deinterlace_remove(struct platform_device *pdev)
 {
-	struct deinterlace_dev *pcdev =
-		(struct deinterlace_dev *)platform_get_drvdata(pdev);
+	struct deinterlace_dev *pcdev = platform_get_drvdata(pdev);
 
 	v4l2_info(&pcdev->v4l2_dev, "Removing " MEM2MEM_TEST_MODULE_NAME);
 	v4l2_m2m_release(pcdev->m2m_dev);
Signature · 1 line
1.7.10.4
author
#2 lore raw

PATCH 3/5 mem2mem_testdev: Remove casting the return value which is a void pointer

In reply to Jingoo Han

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/media/platform/mem2mem_testdev.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/platform/mem2mem_testdev.c +1 -2
index 6a17676..8df5975 100644
@@ -1090,8 +1090,7 @@ unreg_dev:
 
 static int m2mtest_remove(struct platform_device *pdev)
 {
-	struct m2mtest_dev *dev =
-		(struct m2mtest_dev *)platform_get_drvdata(pdev);
+	struct m2mtest_dev *dev = platform_get_drvdata(pdev);
 
 	v4l2_info(&dev->v4l2_dev, "Removing " MEM2MEM_TEST_MODULE_NAME);
 	v4l2_m2m_release(dev->m2m_dev);
Signature · 1 line
1.7.10.4
author
#3 lore raw

PATCH 4/5 ngene: Remove casting the return value which is a void pointer

In reply to Jingoo Han

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/media/pci/ngene/ngene-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/ngene/ngene-core.c +1 -1
index 37ebc42..21d18d4 100644
@@ -1622,7 +1622,7 @@ static void ngene_unlink(struct ngene *dev)
 
 void ngene_shutdown(struct pci_dev *pdev)
 {
-	struct ngene *dev = (struct ngene *)pci_get_drvdata(pdev);
+	struct ngene *dev = pci_get_drvdata(pdev);
 
 	if (!dev || !shutdown_workaround)
 		return;
Signature · 1 line
1.7.10.4
author
#4 lore raw

PATCH 5/5 ddbridge: Remove casting the return value which is a void pointer

In reply to Jingoo Han

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/media/pci/ddbridge/ddbridge-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/ddbridge/ddbridge-core.c +1 -1
index 36e3452..9375f30 100644
@@ -1544,7 +1544,7 @@ static void ddb_unmap(struct ddb *dev)
 
 static void ddb_remove(struct pci_dev *pdev)
 {
-	struct ddb *dev = (struct ddb *) pci_get_drvdata(pdev);
+	struct ddb *dev = pci_get_drvdata(pdev);
 
 	ddb_ports_detach(dev);
 	ddb_i2c_release(dev);
Signature · 1 line
1.7.10.4