Skip to contentSkip to conversation

staging: fsl-mc: Drop unneeded void pointer cast

PATCH New Janani Ravichandran 1 participant 1 message Feb 25, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: fsl-mc: Drop unneeded void pointer cast

Void pointers need not be cast to other pointer types. Semantic patch used:

@r@
expression x;
void *e;
type T;
identifier f;
@@

(
*((T *)e)
|
((T *)x) [...]
|
((T *)x)->f
|
- (T *)
e
)

---
 drivers/staging/fsl-mc/bus/dprc-driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fsl-mc/bus/dprc-driver.c +1 -1
index 9380ebc..31488a7 100644
@@ -407,7 +407,7 @@ static irqreturn_t dprc_irq0_handler_thread(int irq_num, void *arg)
 {
 	int error;
 	u32 status;
-	struct device *dev = (struct device *)arg;
+	struct device *dev = arg;
 	struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev);
 	struct fsl_mc_bus *mc_bus = to_fsl_mc_bus(mc_dev);
 	struct fsl_mc_io *mc_io = mc_dev->mc_io;
Signature · 1 line
2.5.0