]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
staging: rtl8723bs: hal: remove cast to void pointer
authorHimanshu Jha <himanshujha199640@gmail.com>
Mon, 28 Aug 2017 13:39:54 +0000 (19:09 +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/hal/hal_btcoex.c
drivers/staging/rtl8723bs/hal/hal_com.c
drivers/staging/rtl8723bs/hal/odm.c
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
drivers/staging/rtl8723bs/hal/rtl8723b_rxdesc.c
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
drivers/staging/rtl8723bs/hal/sdio_ops.c

index 9e08a4de489578512145f9fc9c7efbb6c9bd40b2..86fee109e42dac7e3eef1e22777cca5004e4d66f 100644 (file)
@@ -419,10 +419,10 @@ static u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
        padapter = pBtCoexist->Adapter;
        pHalData = GET_HAL_DATA(padapter);
        mlmeext = &padapter->mlmeextpriv;
-       pu8 = (u8 *)pOutBuf;
-       pS4Tmp = (s32 *)pOutBuf;
-       pU4Tmp = (u32 *)pOutBuf;
-       pU1Tmp = (u8 *)pOutBuf;
+       pu8 = pOutBuf;
+       pS4Tmp = pOutBuf;
+       pU4Tmp = pOutBuf;
+       pU1Tmp = pOutBuf;
        ret = true;
 
        switch (getType) {
@@ -585,9 +585,9 @@ static u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf)
        pBtCoexist = (PBTC_COEXIST)pBtcContext;
        padapter = pBtCoexist->Adapter;
        pHalData = GET_HAL_DATA(padapter);
-       pu8 = (u8 *)pInBuf;
-       pU1Tmp = (u8 *)pInBuf;
-       pU4Tmp = (u32 *)pInBuf;
+       pu8 = pInBuf;
+       pU1Tmp = pInBuf;
+       pU4Tmp = pInBuf;
        ret = true;
 
        if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist))
index e3a98322f475dc99be01d39ba044467c10b3a6c5..3e63b6d9c097fe9f33e3454175066d40029e81f9 100644 (file)
@@ -1311,7 +1311,7 @@ void SetHalODMVar(
        switch (eVariable) {
        case HAL_ODM_STA_INFO:
                {
-                       struct sta_info *psta = (struct sta_info *)pValue1;
+                       struct sta_info *psta = pValue1;
                        if (bSet) {
                                DBG_8192C("### Set STA_(%d) info ###\n", psta->mac_id);
                                ODM_CmnInfoPtrArrayHook(podmpriv, ODM_CMNINFO_STA_STATUS, psta->mac_id, psta);
@@ -1333,7 +1333,7 @@ void SetHalODMVar(
        #if defined(CONFIG_SIGNAL_DISPLAY_DBM) && defined(CONFIG_BACKGROUND_NOISE_MONITOR)
        case HAL_ODM_NOISE_MONITOR:
                {
-                       struct noise_info *pinfo = (struct noise_info *)pValue1;
+                       struct noise_info *pinfo = pValue1;
 
                        #ifdef DBG_NOISE_MONITOR
                        DBG_8192C("### Noise monitor chan(%d)-bPauseDIG:%d, IGIValue:0x%02x, max_time:%d (ms) ###\n",
index 2dbf19971e041695c970ba6aceeecdf1a24ac872..ff43bb26950b1b80b98e2783a8801d4f0dcf0728 100644 (file)
@@ -592,95 +592,95 @@ void ODM_CmnInfoHook(PDM_ODM_T pDM_Odm, ODM_CMNINFO_E CmnInfo, void *pValue)
        /*  Dynamic call by reference pointer. */
        /*  */
        case ODM_CMNINFO_MAC_PHY_MODE:
-               pDM_Odm->pMacPhyMode = (u8 *)pValue;
+               pDM_Odm->pMacPhyMode = pValue;
                break;
 
        case ODM_CMNINFO_TX_UNI:
-               pDM_Odm->pNumTxBytesUnicast = (u64 *)pValue;
+               pDM_Odm->pNumTxBytesUnicast = pValue;
                break;
 
        case ODM_CMNINFO_RX_UNI:
-               pDM_Odm->pNumRxBytesUnicast = (u64 *)pValue;
+               pDM_Odm->pNumRxBytesUnicast = pValue;
                break;
 
        case ODM_CMNINFO_WM_MODE:
-               pDM_Odm->pwirelessmode = (u8 *)pValue;
+               pDM_Odm->pwirelessmode = pValue;
                break;
 
        case ODM_CMNINFO_BAND:
-               pDM_Odm->pBandType = (u8 *)pValue;
+               pDM_Odm->pBandType = pValue;
                break;
 
        case ODM_CMNINFO_SEC_CHNL_OFFSET:
-               pDM_Odm->pSecChOffset = (u8 *)pValue;
+               pDM_Odm->pSecChOffset = pValue;
                break;
 
        case ODM_CMNINFO_SEC_MODE:
-               pDM_Odm->pSecurity = (u8 *)pValue;
+               pDM_Odm->pSecurity = pValue;
                break;
 
        case ODM_CMNINFO_BW:
-               pDM_Odm->pBandWidth = (u8 *)pValue;
+               pDM_Odm->pBandWidth = pValue;
                break;
 
        case ODM_CMNINFO_CHNL:
-               pDM_Odm->pChannel = (u8 *)pValue;
+               pDM_Odm->pChannel = pValue;
                break;
 
        case ODM_CMNINFO_DMSP_GET_VALUE:
-               pDM_Odm->pbGetValueFromOtherMac = (bool *)pValue;
+               pDM_Odm->pbGetValueFromOtherMac = pValue;
                break;
 
        case ODM_CMNINFO_BUDDY_ADAPTOR:
-               pDM_Odm->pBuddyAdapter = (struct adapter **)pValue;
+               pDM_Odm->pBuddyAdapter = pValue;
                break;
 
        case ODM_CMNINFO_DMSP_IS_MASTER:
-               pDM_Odm->pbMasterOfDMSP = (bool *)pValue;
+               pDM_Odm->pbMasterOfDMSP = pValue;
                break;
 
        case ODM_CMNINFO_SCAN:
-               pDM_Odm->pbScanInProcess = (bool *)pValue;
+               pDM_Odm->pbScanInProcess = pValue;
                break;
 
        case ODM_CMNINFO_POWER_SAVING:
-               pDM_Odm->pbPowerSaving = (bool *)pValue;
+               pDM_Odm->pbPowerSaving = pValue;
                break;
 
        case ODM_CMNINFO_ONE_PATH_CCA:
-               pDM_Odm->pOnePathCCA = (u8 *)pValue;
+               pDM_Odm->pOnePathCCA = pValue;
                break;
 
        case ODM_CMNINFO_DRV_STOP:
-               pDM_Odm->pbDriverStopped =  (bool *)pValue;
+               pDM_Odm->pbDriverStopped =  pValue;
                break;
 
        case ODM_CMNINFO_PNP_IN:
-               pDM_Odm->pbDriverIsGoingToPnpSetPowerSleep =  (bool *)pValue;
+               pDM_Odm->pbDriverIsGoingToPnpSetPowerSleep =  pValue;
                break;
 
        case ODM_CMNINFO_INIT_ON:
-               pDM_Odm->pinit_adpt_in_progress =  (bool *)pValue;
+               pDM_Odm->pinit_adpt_in_progress =  pValue;
                break;
 
        case ODM_CMNINFO_ANT_TEST:
-               pDM_Odm->pAntennaTest =  (u8 *)pValue;
+               pDM_Odm->pAntennaTest =  pValue;
                break;
 
        case ODM_CMNINFO_NET_CLOSED:
-               pDM_Odm->pbNet_closed = (bool *)pValue;
+               pDM_Odm->pbNet_closed = pValue;
                break;
 
        case ODM_CMNINFO_FORCED_RATE:
-               pDM_Odm->pForcedDataRate = (u16 *)pValue;
+               pDM_Odm->pForcedDataRate = pValue;
                break;
 
        case ODM_CMNINFO_FORCED_IGI_LB:
-               pDM_Odm->pu1ForcedIgiLb = (u8 *)pValue;
+               pDM_Odm->pu1ForcedIgiLb = pValue;
                break;
 
        case ODM_CMNINFO_MP_MODE:
-               pDM_Odm->mp_mode = (u8 *)pValue;
+               pDM_Odm->mp_mode = pValue;
                break;
 
        /* case ODM_CMNINFO_RTSTA_AID: */
index 84a89ef741698f14bf8878b56fc3cb1cb5e5b35d..1565f2d67ea4ab224ee6c0c067f6ae740c5b042a 100644 (file)
@@ -63,7 +63,7 @@ static int _BlockWrite(struct adapter *padapter, void *buffer, u32 buffSize)
        u32 blockSize_p3 = 1; /*  Phase #3 : Use 1-byte, the remnant of FW image. */
        u32 blockCount_p1 = 0, blockCount_p2 = 0, blockCount_p3 = 0;
        u32 remainSize_p1 = 0, remainSize_p2 = 0;
-       u8 *bufferPtr = (u8 *)buffer;
+       u8 *bufferPtr = buffer;
        u32 i = 0, offset = 0;
 
 /*     printk("====>%s %d\n", __func__, __LINE__); */
@@ -163,7 +163,7 @@ static int _WriteFW(struct adapter *padapter, void *buffer, u32 size)
        int ret = _SUCCESS;
        u32 pageNums, remainSize;
        u32 page, offset;
-       u8 *bufferPtr = (u8 *)buffer;
+       u8 *bufferPtr = buffer;
 
        pageNums = size / MAX_DLFW_PAGE_SIZE;
        /* RT_ASSERT((pageNums <= 4), ("Page numbers should not greater then 4\n")); */
@@ -643,7 +643,7 @@ static void Hal_GetEfuseDefinition(
        case TYPE_EFUSE_MAX_SECTION:
                {
                        u8 *pMax_section;
-                       pMax_section = (u8 *)pOut;
+                       pMax_section = pOut;
 
                        if (efuseType == EFUSE_WIFI)
                                *pMax_section = EFUSE_MAX_SECTION_8723B;
@@ -655,7 +655,7 @@ static void Hal_GetEfuseDefinition(
        case TYPE_EFUSE_REAL_CONTENT_LEN:
                {
                        u16 *pu2Tmp;
-                       pu2Tmp = (u16 *)pOut;
+                       pu2Tmp = pOut;
 
                        if (efuseType == EFUSE_WIFI)
                                *pu2Tmp = EFUSE_REAL_CONTENT_LEN_8723B;
@@ -667,7 +667,7 @@ static void Hal_GetEfuseDefinition(
        case TYPE_AVAILABLE_EFUSE_BYTES_BANK:
                {
                        u16 *pu2Tmp;
-                       pu2Tmp = (u16 *)pOut;
+                       pu2Tmp = pOut;
 
                        if (efuseType == EFUSE_WIFI)
                                *pu2Tmp = (EFUSE_REAL_CONTENT_LEN_8723B-EFUSE_OOB_PROTECT_BYTES);
@@ -679,7 +679,7 @@ static void Hal_GetEfuseDefinition(
        case TYPE_AVAILABLE_EFUSE_BYTES_TOTAL:
                {
                        u16 *pu2Tmp;
-                       pu2Tmp = (u16 *)pOut;
+                       pu2Tmp = pOut;
 
                        if (efuseType == EFUSE_WIFI)
                                *pu2Tmp = (EFUSE_REAL_CONTENT_LEN_8723B-EFUSE_OOB_PROTECT_BYTES);
@@ -691,7 +691,7 @@ static void Hal_GetEfuseDefinition(
        case TYPE_EFUSE_MAP_LEN:
                {
                        u16 *pu2Tmp;
-                       pu2Tmp = (u16 *)pOut;
+                       pu2Tmp = pOut;
 
                        if (efuseType == EFUSE_WIFI)
                                *pu2Tmp = EFUSE_MAX_MAP_LEN;
@@ -703,7 +703,7 @@ static void Hal_GetEfuseDefinition(
        case TYPE_EFUSE_PROTECT_BYTES_BANK:
                {
                        u8 *pu1Tmp;
-                       pu1Tmp = (u8 *)pOut;
+                       pu1Tmp = pOut;
 
                        if (efuseType == EFUSE_WIFI)
                                *pu1Tmp = EFUSE_OOB_PROTECT_BYTES;
@@ -715,7 +715,7 @@ static void Hal_GetEfuseDefinition(
        case TYPE_EFUSE_CONTENT_LEN_BANK:
                {
                        u16 *pu2Tmp;
-                       pu2Tmp = (u16 *)pOut;
+                       pu2Tmp = pOut;
 
                        if (efuseType == EFUSE_WIFI)
                                *pu2Tmp = EFUSE_REAL_CONTENT_LEN_8723B;
@@ -727,7 +727,7 @@ static void Hal_GetEfuseDefinition(
        default:
                {
                        u8 *pu1Tmp;
-                       pu1Tmp = (u8 *)pOut;
+                       pu1Tmp = pOut;
                        *pu1Tmp = 0;
                }
                break;
index 92e5a0e7aa596624451a17fa8057e453b8e96d47..14bfbe3be0ca945ff45d72226b58dddbddd9176c 100644 (file)
@@ -64,7 +64,7 @@ static void process_link_qual(struct adapter *padapter, union recv_frame *prfram
 
 void rtl8723b_process_phy_info(struct adapter *padapter, void *prframe)
 {
-       union recv_frame *precvframe = (union recv_frame *)prframe;
+       union recv_frame *precvframe = prframe;
        /*  */
        /*  Check RSSI */
        /*  */
index b002eb446b2c4cef79fedbe5d68e660bbc0e35b4..d9a4567ca7211c3e21db9b0474998bdeaa62acd3 100644 (file)
@@ -190,7 +190,7 @@ static void rtl8723bs_recv_tasklet(void *priv)
        u8 shift_sz = 0, rx_report_sz = 0;
 
 
-       padapter = (struct adapter *)priv;
+       padapter = priv;
        pHalData = GET_HAL_DATA(padapter);
        precvpriv = &padapter->recvpriv;
 
index 9bee2e40be32099b757e232396d97c3105df9025..d0b317077511ce23d1939617dd575204bce90d84 100644 (file)
@@ -490,7 +490,7 @@ int rtl8723bs_xmit_thread(void *context)
 
 
        ret = _SUCCESS;
-       padapter = (struct adapter *)context;
+       padapter = context;
        pxmitpriv = &padapter->xmitpriv;
 
        rtw_sprintf(thread_name, 20, "%s-"ADPT_FMT, thread_name, ADPT_ARG(padapter));
index 6285b72faa9a4decf49794a0c9db22b3e1d432a8..1d1b14dedd35d8d1a540dbc524f4fb2e2cf510a8 100644 (file)
@@ -1121,7 +1121,7 @@ void sd_int_dpc(struct adapter *padapter)
                        }
                } else {
                        /* Error handling for malloc fail */
-                       if (rtw_cbuf_push(padapter->evtpriv.c2h_queue, (void *)NULL) != _SUCCESS)
+                       if (rtw_cbuf_push(padapter->evtpriv.c2h_queue, NULL) != _SUCCESS)
                                DBG_871X("%s rtw_cbuf_push fail\n", __func__);
                        _set_workitem(&padapter->evtpriv.c2h_wk);
                }