staging: rtl8723bs: core: remove cast to void pointer
authorHimanshu Jha <himanshujha199640@gmail.com>
Mon, 28 Aug 2017 12:34:38 +0000 (18:04 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Aug 2017 06:24:04 +0000 (08:24 +0200)
casting to void pointer from any pointer type and vice-versa is done
implicitly and therefore casting is not needed in such a case.

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_cmd.c
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
drivers/staging/rtl8723bs/core/rtw_recv.c
drivers/staging/rtl8723bs/core/rtw_xmit.c

index 080c81b9aa94fe3e1f86d7c179966a3e1e38fc63..d381827dba3bf7223c1212c8ad0178a831f05575 100644 (file)
@@ -432,7 +432,7 @@ int rtw_cmd_thread(void *context)
        unsigned long cmd_process_time;
        u8 (*cmd_hdl)(struct adapter *padapter, u8 *pbuf);
        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);
        struct drvextra_cmd_parm *extra_parm = NULL;
 
index 99e3b682c8345055d5c38b3d59ac7014582e0af0..b6d137f505e1e0faed2bbeb92b179ff88a975ec4 100644 (file)
@@ -1228,7 +1228,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
        }
 
        pstat = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
-       if (pstat == (struct sta_info *)NULL) {
+       if (pstat == NULL) {
                status = _RSON_CLS2_;
                goto asoc_class2_error;
        }
index f060e54e11f58b21d9a14f6f7716b398007d400d..aabdaafcbdd3a846bf595e7acc4a506de6d0d799 100644 (file)
@@ -829,7 +829,7 @@ static void pwr_rpwm_timeout_handler(void *FunctionContext)
        struct pwrctrl_priv *pwrpriv;
 
 
-       padapter = (struct adapter *)FunctionContext;
+       padapter = FunctionContext;
        pwrpriv = adapter_to_pwrctl(padapter);
        DBG_871X("+%s: rpwm = 0x%02X cpwm = 0x%02X\n", __func__, pwrpriv->rpwm, pwrpriv->cpwm);
 
index c6018f07d71205a15c1a80fdd696a02ea502050f..68a6303e27540b545c22d16e2d0daa380844dd1f 100644 (file)
@@ -2360,7 +2360,7 @@ _err_exit:
 
 void rtw_reordering_ctrl_timeout_handler(void *pcontext)
 {
-       struct recv_reorder_ctrl *preorder_ctrl = (struct recv_reorder_ctrl *)pcontext;
+       struct recv_reorder_ctrl *preorder_ctrl = pcontext;
        struct adapter *padapter = preorder_ctrl->padapter;
        struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
 
index a0d79985f6b90111fd58e78cefcf75167cd40669..022f654419e4dcd0724f86444fb37de77ef40641 100644 (file)
@@ -3002,7 +3002,7 @@ int rtw_xmit_thread(void *context)
 
 
        err = _SUCCESS;
-       padapter = (struct adapter *)context;
+       padapter = context;
 
        thread_enter("RTW_XMIT_THREAD");