staging: rtl8188eu: hal: Remove useless cast on void pointer
authorTapasweni Pathak <tapaswenipathak@gmail.com>
Thu, 30 Oct 2014 11:33:19 +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/hal/rtl8188e_hal_init.c
drivers/staging/rtl8188eu/hal/rtl8188e_xmit.c

index d6fe5e6..68db5c9 100644 (file)
@@ -181,7 +181,7 @@ static void rtl8188e_SetHalODMVar(struct adapter *Adapter, enum hal_odm_variable
        switch (eVariable) {
        case HAL_ODM_STA_INFO:
                {
-                       struct sta_info *psta = (struct sta_info *)pValue1;
+                       struct sta_info *psta = pValue1;
                        if (bSet) {
                                DBG_88E("### Set STA_(%d) info\n", psta->mac_id);
                                ODM_CmnInfoPtrArrayHook(podmpriv, ODM_CMNINFO_STA_STATUS, psta->mac_id, psta);
index 7a4f754..a6ba53b 100644 (file)
@@ -25,7 +25,7 @@
 
 void dump_txrpt_ccx_88e(void *buf)
 {
-       struct txrpt_ccx_88e *txrpt_ccx = (struct txrpt_ccx_88e *)buf;
+       struct txrpt_ccx_88e *txrpt_ccx = buf;
 
        DBG_88E("%s:\n"
                "tag1:%u, pkt_num:%u, txdma_underflow:%u, int_bt:%u, int_tri:%u, int_ccx:%u\n"