Staging: rtl8712: usb_ops_linux: Remove useless cast
authorShivani Bhardwaj <shivanib134@gmail.com>
Wed, 14 Oct 2015 13:54:10 +0000 (19:24 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Oct 2015 05:12:30 +0000 (22:12 -0700)
Explicit type conversion is not required and should be removed.
Semantic patch used:
@@
type T;
T e;
identifier x;
@@

* T x = (T)e;

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/usb_ops_linux.c

index 9d0d0311a49ed96dc4cbb53d3dab2ecf3e1b57ff..c940722fbfd3c60cf33574b7aa9b0a21eb61965f 100644 (file)
@@ -170,7 +170,7 @@ void r8712_usb_write_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
        unsigned int pipe;
        struct _adapter *padapter = (struct _adapter *)pintfhdl->adapter;
        struct intf_priv *pintfpriv = pintfhdl->pintfpriv;
-       struct io_queue *pio_queue = (struct io_queue *)padapter->pio_queue;
+       struct io_queue *pio_queue = padapter->pio_queue;
        struct dvobj_priv *pdvobj = (struct dvobj_priv *)pintfpriv->intf_dev;
        struct usb_device *pusbd = pdvobj->pusbdev;
        struct urb *piorw_urb = pintfpriv->piorw_urb;
@@ -259,7 +259,7 @@ u32 r8712_usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
        struct recv_buf *precvbuf = (struct recv_buf *)rmem;
        struct intf_priv *pintfpriv = pintfhdl->pintfpriv;
        struct dvobj_priv *pdvobj = (struct dvobj_priv *)pintfpriv->intf_dev;
-       struct _adapter *adapter = (struct _adapter *)pdvobj->padapter;
+       struct _adapter *adapter = pdvobj->padapter;
        struct recv_priv *precvpriv = &adapter->recvpriv;
        struct usb_device *pusbd = pdvobj->pusbdev;
 
@@ -400,7 +400,7 @@ u32 r8712_usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
        u32 ret, bwritezero;
        struct urb *purb = NULL;
        struct _adapter *padapter = (struct _adapter *)pintfhdl->adapter;
-       struct dvobj_priv *pdvobj = (struct dvobj_priv   *)&padapter->dvobjpriv;
+       struct dvobj_priv *pdvobj = &padapter->dvobjpriv;
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
        struct xmit_frame *pxmitframe = (struct xmit_frame *)wmem;
        struct usb_device *pusbd = pdvobj->pusbdev;