staging: wilc1000: linux_mon: remove cast on void pointer
authorAlison Schofield <amsfield22@gmail.com>
Sat, 13 Feb 2016 06:52:11 +0000 (22:52 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Feb 2016 00:31:44 +0000 (16:31 -0800)
Remove cast on void pointer. C programming language guarantees
the conversion from void pointer to any other pointer type.

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

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

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_mon.c

index e9bb0ec5cbc677c37aec0b2720d32b8db51ad5ae..ba702b23f8524bb604ec97706c88e65a608ca836 100644 (file)
@@ -137,7 +137,7 @@ struct tx_complete_mon_data {
 
 static void mgmt_tx_complete(void *priv, int status)
 {
-       struct tx_complete_mon_data *pv_data = (struct tx_complete_mon_data *)priv;
+       struct tx_complete_mon_data *pv_data = priv;
        u8 *buf =  pv_data->buff;
 
        if (status == 1) {
This page took 0.040698 seconds and 5 git commands to generate.