diff options
author | Himanshu Jha <himanshujha199640@gmail.com> | 2017-08-28 16:39:54 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-29 09:24:04 +0300 |
commit | 1b98ee3325c91a2e1c58e1f02db4b0f90a324f1c (patch) | |
tree | 7b5f2de6ae025be7817477a286db46445b1cb9f2 /drivers/staging/rtl8723bs | |
parent | 67e3e07e82f8657d4fe702fc9c96a513db9bdce1 (diff) | |
download | linux-1b98ee3325c91a2e1c58e1f02db4b0f90a324f1c.tar.xz |
staging: rtl8723bs: hal: remove cast to void pointer
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>
Diffstat (limited to 'drivers/staging/rtl8723bs')
-rw-r--r-- | drivers/staging/rtl8723bs/hal/hal_btcoex.c | 14 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/hal_com.c | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/odm.c | 46 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 20 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/rtl8723b_rxdesc.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/sdio_ops.c | 2 |
8 files changed, 46 insertions, 46 deletions
diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/rtl8723bs/hal/hal_btcoex.c index 9e08a4de4895..86fee109e42d 100644 --- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c +++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c @@ -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)) diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c index e3a98322f475..3e63b6d9c097 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com.c +++ b/drivers/staging/rtl8723bs/hal/hal_com.c @@ -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", diff --git a/drivers/staging/rtl8723bs/hal/odm.c b/drivers/staging/rtl8723bs/hal/odm.c index 2dbf19971e04..ff43bb26950b 100644 --- a/drivers/staging/rtl8723bs/hal/odm.c +++ b/drivers/staging/rtl8723bs/hal/odm.c @@ -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: */ diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c index 84a89ef74169..1565f2d67ea4 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c @@ -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; diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_rxdesc.c b/drivers/staging/rtl8723bs/hal/rtl8723b_rxdesc.c index 92e5a0e7aa59..14bfbe3be0ca 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_rxdesc.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_rxdesc.c @@ -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 */ /* */ diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c index b002eb446b2c..d9a4567ca721 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c @@ -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; diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c index 9bee2e40be32..d0b317077511 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c @@ -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)); diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c index 6285b72faa9a..1d1b14dedd35 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_ops.c +++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c @@ -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); } |