]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: rtl8188eu: os_dep: Remove useless cast on void pointer
authorTapasweni Pathak <tapaswenipathak@gmail.com>
Thu, 30 Oct 2014 11:33:31 +0000 (17:03 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Oct 2014 20:05:49 +0000 (13:05 -0700)
void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

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

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

Build tested it.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c

index ba1e178fb51043693a10c1bdc65a7bd316f07413..7da85f9c127b1fa4c73d546c0ba9ee65e2623561 100644 (file)
@@ -843,7 +843,7 @@ void usb_write_port_cancel(struct adapter *padapter)
 void rtl8188eu_recv_tasklet(void *priv)
 {
        struct sk_buff *pskb;
-       struct adapter *adapt = (struct adapter *)priv;
+       struct adapter *adapt = priv;
        struct recv_priv *precvpriv = &adapt->recvpriv;
 
        while (NULL != (pskb = skb_dequeue(&precvpriv->rx_skb_queue))) {
@@ -862,7 +862,7 @@ void rtl8188eu_recv_tasklet(void *priv)
 void rtl8188eu_xmit_tasklet(void *priv)
 {
        int ret = false;
-       struct adapter *adapt = (struct adapter *)priv;
+       struct adapter *adapt = priv;
        struct xmit_priv *pxmitpriv = &adapt->xmitpriv;
 
        if (check_fwstate(&adapt->mlmepriv, _FW_UNDER_SURVEY))