Skip to contentSkip to conversation

staging: rtl8192e: Drop cast on void pointer

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

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8192e: Drop cast on void pointer

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/rtl8192e/rtl8192e/rtl_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +1 -1
index 0b06482..aeb0df5 100644
@@ -2402,7 +2402,7 @@ out:
 
 static irqreturn_t _rtl92e_irq(int irq, void *netdev)
 {
-	struct net_device *dev = (struct net_device *) netdev;
+	struct net_device *dev = netdev;
 	struct r8192_priv *priv = rtllib_priv(dev);
 	unsigned long flags;
 	u32 inta;
Signature · 1 line
2.5.0