]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
staging: rtl8712: Remove cast on void pointer
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Sun, 21 Feb 2016 07:21:32 +0000 (12:51 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl8712_cmd.c

index 86a9089b62fd5e74ee5c05ad61f65427ea953413..50f400234593ab04417e5c5138fadbbe37d76bcb 100644 (file)
@@ -317,7 +317,7 @@ int r8712_cmd_thread(void *context)
        unsigned int cmdsz, wr_sz, *pcmdbuf;
        struct tx_desc *pdesc;
        void (*pcmd_callback)(struct _adapter *dev, struct cmd_obj *pcmd);
-       struct _adapter *padapter = (struct _adapter *)context;
+       struct _adapter *padapter = context;
        struct  cmd_priv        *pcmdpriv = &(padapter->cmdpriv);
 
        allow_signal(SIGTERM);