]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
staging: rtl8712: Remove unnecessary cast on void pointer
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Sun, 21 Feb 2016 07:26:16 +0000 (12:56 +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/usb_ops_linux.c

index c2ac5818a18d39b514506d10f2bd3528d4e5e28a..454cdf6c7fa1192222617dbd3b0ea65ebadafaba 100644 (file)
@@ -334,7 +334,7 @@ void r8712_usb_read_port_cancel(struct _adapter *padapter)
 void r8712_xmit_bh(void *priv)
 {
        int ret = false;
-       struct _adapter *padapter = (struct _adapter *)priv;
+       struct _adapter *padapter = priv;
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
 
        if (padapter->bDriverStopped ||