Browse Source

staging: wilc1000: linux_mon: remove cast on void pointer

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>
Alison Schofield 9 years ago
parent
commit
6bcc1e1e70
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/staging/wilc1000/linux_mon.c

+ 1 - 1
drivers/staging/wilc1000/linux_mon.c

@@ -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) {