Commit 1b98ee33 authored by Himanshu Jha's avatar Himanshu Jha Committed by Greg Kroah-Hartman

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: default avatarHimanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 67e3e07e
...@@ -419,10 +419,10 @@ static u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf) ...@@ -419,10 +419,10 @@ static u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)
padapter = pBtCoexist->Adapter; padapter = pBtCoexist->Adapter;
pHalData = GET_HAL_DATA(padapter); pHalData = GET_HAL_DATA(padapter);
mlmeext = &padapter->mlmeextpriv; mlmeext = &padapter->mlmeextpriv;
pu8 = (u8 *)pOutBuf; pu8 = pOutBuf;
pS4Tmp = (s32 *)pOutBuf; pS4Tmp = pOutBuf;
pU4Tmp = (u32 *)pOutBuf; pU4Tmp = pOutBuf;
pU1Tmp = (u8 *)pOutBuf; pU1Tmp = pOutBuf;
ret = true; ret = true;
switch (getType) { switch (getType) {
...@@ -585,9 +585,9 @@ static u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf) ...@@ -585,9 +585,9 @@ static u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf)
pBtCoexist = (PBTC_COEXIST)pBtcContext; pBtCoexist = (PBTC_COEXIST)pBtcContext;
padapter = pBtCoexist->Adapter; padapter = pBtCoexist->Adapter;
pHalData = GET_HAL_DATA(padapter); pHalData = GET_HAL_DATA(padapter);
pu8 = (u8 *)pInBuf; pu8 = pInBuf;
pU1Tmp = (u8 *)pInBuf; pU1Tmp = pInBuf;
pU4Tmp = (u32 *)pInBuf; pU4Tmp = pInBuf;
ret = true; ret = true;
if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist)) if (!halbtcoutsrc_IsBtCoexistAvailable(pBtCoexist))
......
...@@ -1311,7 +1311,7 @@ void SetHalODMVar( ...@@ -1311,7 +1311,7 @@ void SetHalODMVar(
switch (eVariable) { switch (eVariable) {
case HAL_ODM_STA_INFO: case HAL_ODM_STA_INFO:
{ {
struct sta_info *psta = (struct sta_info *)pValue1; struct sta_info *psta = pValue1;
if (bSet) { if (bSet) {
DBG_8192C("### Set STA_(%d) info ###\n", psta->mac_id); DBG_8192C("### Set STA_(%d) info ###\n", psta->mac_id);
ODM_CmnInfoPtrArrayHook(podmpriv, ODM_CMNINFO_STA_STATUS, psta->mac_id, psta); ODM_CmnInfoPtrArrayHook(podmpriv, ODM_CMNINFO_STA_STATUS, psta->mac_id, psta);
...@@ -1333,7 +1333,7 @@ void SetHalODMVar( ...@@ -1333,7 +1333,7 @@ void SetHalODMVar(
#if defined(CONFIG_SIGNAL_DISPLAY_DBM) && defined(CONFIG_BACKGROUND_NOISE_MONITOR) #if defined(CONFIG_SIGNAL_DISPLAY_DBM) && defined(CONFIG_BACKGROUND_NOISE_MONITOR)
case HAL_ODM_NOISE_MONITOR: case HAL_ODM_NOISE_MONITOR:
{ {
struct noise_info *pinfo = (struct noise_info *)pValue1; struct noise_info *pinfo = pValue1;
#ifdef DBG_NOISE_MONITOR #ifdef DBG_NOISE_MONITOR
DBG_8192C("### Noise monitor chan(%d)-bPauseDIG:%d, IGIValue:0x%02x, max_time:%d (ms) ###\n", DBG_8192C("### Noise monitor chan(%d)-bPauseDIG:%d, IGIValue:0x%02x, max_time:%d (ms) ###\n",
......
...@@ -592,95 +592,95 @@ void ODM_CmnInfoHook(PDM_ODM_T pDM_Odm, ODM_CMNINFO_E CmnInfo, void *pValue) ...@@ -592,95 +592,95 @@ void ODM_CmnInfoHook(PDM_ODM_T pDM_Odm, ODM_CMNINFO_E CmnInfo, void *pValue)
/* Dynamic call by reference pointer. */ /* Dynamic call by reference pointer. */
/* */ /* */
case ODM_CMNINFO_MAC_PHY_MODE: case ODM_CMNINFO_MAC_PHY_MODE:
pDM_Odm->pMacPhyMode = (u8 *)pValue; pDM_Odm->pMacPhyMode = pValue;
break; break;
case ODM_CMNINFO_TX_UNI: case ODM_CMNINFO_TX_UNI:
pDM_Odm->pNumTxBytesUnicast = (u64 *)pValue; pDM_Odm->pNumTxBytesUnicast = pValue;
break; break;
case ODM_CMNINFO_RX_UNI: case ODM_CMNINFO_RX_UNI:
pDM_Odm->pNumRxBytesUnicast = (u64 *)pValue; pDM_Odm->pNumRxBytesUnicast = pValue;
break; break;
case ODM_CMNINFO_WM_MODE: case ODM_CMNINFO_WM_MODE:
pDM_Odm->pwirelessmode = (u8 *)pValue; pDM_Odm->pwirelessmode = pValue;
break; break;
case ODM_CMNINFO_BAND: case ODM_CMNINFO_BAND:
pDM_Odm->pBandType = (u8 *)pValue; pDM_Odm->pBandType = pValue;
break; break;
case ODM_CMNINFO_SEC_CHNL_OFFSET: case ODM_CMNINFO_SEC_CHNL_OFFSET:
pDM_Odm->pSecChOffset = (u8 *)pValue; pDM_Odm->pSecChOffset = pValue;
break; break;
case ODM_CMNINFO_SEC_MODE: case ODM_CMNINFO_SEC_MODE:
pDM_Odm->pSecurity = (u8 *)pValue; pDM_Odm->pSecurity = pValue;
break; break;
case ODM_CMNINFO_BW: case ODM_CMNINFO_BW:
pDM_Odm->pBandWidth = (u8 *)pValue; pDM_Odm->pBandWidth = pValue;
break; break;
case ODM_CMNINFO_CHNL: case ODM_CMNINFO_CHNL:
pDM_Odm->pChannel = (u8 *)pValue; pDM_Odm->pChannel = pValue;
break; break;
case ODM_CMNINFO_DMSP_GET_VALUE: case ODM_CMNINFO_DMSP_GET_VALUE:
pDM_Odm->pbGetValueFromOtherMac = (bool *)pValue; pDM_Odm->pbGetValueFromOtherMac = pValue;
break; break;
case ODM_CMNINFO_BUDDY_ADAPTOR: case ODM_CMNINFO_BUDDY_ADAPTOR:
pDM_Odm->pBuddyAdapter = (struct adapter **)pValue; pDM_Odm->pBuddyAdapter = pValue;
break; break;
case ODM_CMNINFO_DMSP_IS_MASTER: case ODM_CMNINFO_DMSP_IS_MASTER:
pDM_Odm->pbMasterOfDMSP = (bool *)pValue; pDM_Odm->pbMasterOfDMSP = pValue;
break; break;
case ODM_CMNINFO_SCAN: case ODM_CMNINFO_SCAN:
pDM_Odm->pbScanInProcess = (bool *)pValue; pDM_Odm->pbScanInProcess = pValue;
break; break;
case ODM_CMNINFO_POWER_SAVING: case ODM_CMNINFO_POWER_SAVING:
pDM_Odm->pbPowerSaving = (bool *)pValue; pDM_Odm->pbPowerSaving = pValue;
break; break;
case ODM_CMNINFO_ONE_PATH_CCA: case ODM_CMNINFO_ONE_PATH_CCA:
pDM_Odm->pOnePathCCA = (u8 *)pValue; pDM_Odm->pOnePathCCA = pValue;
break; break;
case ODM_CMNINFO_DRV_STOP: case ODM_CMNINFO_DRV_STOP:
pDM_Odm->pbDriverStopped = (bool *)pValue; pDM_Odm->pbDriverStopped = pValue;
break; break;
case ODM_CMNINFO_PNP_IN: case ODM_CMNINFO_PNP_IN:
pDM_Odm->pbDriverIsGoingToPnpSetPowerSleep = (bool *)pValue; pDM_Odm->pbDriverIsGoingToPnpSetPowerSleep = pValue;
break; break;
case ODM_CMNINFO_INIT_ON: case ODM_CMNINFO_INIT_ON:
pDM_Odm->pinit_adpt_in_progress = (bool *)pValue; pDM_Odm->pinit_adpt_in_progress = pValue;
break; break;
case ODM_CMNINFO_ANT_TEST: case ODM_CMNINFO_ANT_TEST:
pDM_Odm->pAntennaTest = (u8 *)pValue; pDM_Odm->pAntennaTest = pValue;
break; break;
case ODM_CMNINFO_NET_CLOSED: case ODM_CMNINFO_NET_CLOSED:
pDM_Odm->pbNet_closed = (bool *)pValue; pDM_Odm->pbNet_closed = pValue;
break; break;
case ODM_CMNINFO_FORCED_RATE: case ODM_CMNINFO_FORCED_RATE:
pDM_Odm->pForcedDataRate = (u16 *)pValue; pDM_Odm->pForcedDataRate = pValue;
break; break;
case ODM_CMNINFO_FORCED_IGI_LB: case ODM_CMNINFO_FORCED_IGI_LB:
pDM_Odm->pu1ForcedIgiLb = (u8 *)pValue; pDM_Odm->pu1ForcedIgiLb = pValue;
break; break;
case ODM_CMNINFO_MP_MODE: case ODM_CMNINFO_MP_MODE:
pDM_Odm->mp_mode = (u8 *)pValue; pDM_Odm->mp_mode = pValue;
break; break;
/* case ODM_CMNINFO_RTSTA_AID: */ /* case ODM_CMNINFO_RTSTA_AID: */
......
...@@ -63,7 +63,7 @@ static int _BlockWrite(struct adapter *padapter, void *buffer, u32 buffSize) ...@@ -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 blockSize_p3 = 1; /* Phase #3 : Use 1-byte, the remnant of FW image. */
u32 blockCount_p1 = 0, blockCount_p2 = 0, blockCount_p3 = 0; u32 blockCount_p1 = 0, blockCount_p2 = 0, blockCount_p3 = 0;
u32 remainSize_p1 = 0, remainSize_p2 = 0; u32 remainSize_p1 = 0, remainSize_p2 = 0;
u8 *bufferPtr = (u8 *)buffer; u8 *bufferPtr = buffer;
u32 i = 0, offset = 0; u32 i = 0, offset = 0;
/* printk("====>%s %d\n", __func__, __LINE__); */ /* printk("====>%s %d\n", __func__, __LINE__); */
...@@ -163,7 +163,7 @@ static int _WriteFW(struct adapter *padapter, void *buffer, u32 size) ...@@ -163,7 +163,7 @@ static int _WriteFW(struct adapter *padapter, void *buffer, u32 size)
int ret = _SUCCESS; int ret = _SUCCESS;
u32 pageNums, remainSize; u32 pageNums, remainSize;
u32 page, offset; u32 page, offset;
u8 *bufferPtr = (u8 *)buffer; u8 *bufferPtr = buffer;
pageNums = size / MAX_DLFW_PAGE_SIZE; pageNums = size / MAX_DLFW_PAGE_SIZE;
/* RT_ASSERT((pageNums <= 4), ("Page numbers should not greater then 4\n")); */ /* RT_ASSERT((pageNums <= 4), ("Page numbers should not greater then 4\n")); */
...@@ -643,7 +643,7 @@ static void Hal_GetEfuseDefinition( ...@@ -643,7 +643,7 @@ static void Hal_GetEfuseDefinition(
case TYPE_EFUSE_MAX_SECTION: case TYPE_EFUSE_MAX_SECTION:
{ {
u8 *pMax_section; u8 *pMax_section;
pMax_section = (u8 *)pOut; pMax_section = pOut;
if (efuseType == EFUSE_WIFI) if (efuseType == EFUSE_WIFI)
*pMax_section = EFUSE_MAX_SECTION_8723B; *pMax_section = EFUSE_MAX_SECTION_8723B;
...@@ -655,7 +655,7 @@ static void Hal_GetEfuseDefinition( ...@@ -655,7 +655,7 @@ static void Hal_GetEfuseDefinition(
case TYPE_EFUSE_REAL_CONTENT_LEN: case TYPE_EFUSE_REAL_CONTENT_LEN:
{ {
u16 *pu2Tmp; u16 *pu2Tmp;
pu2Tmp = (u16 *)pOut; pu2Tmp = pOut;
if (efuseType == EFUSE_WIFI) if (efuseType == EFUSE_WIFI)
*pu2Tmp = EFUSE_REAL_CONTENT_LEN_8723B; *pu2Tmp = EFUSE_REAL_CONTENT_LEN_8723B;
...@@ -667,7 +667,7 @@ static void Hal_GetEfuseDefinition( ...@@ -667,7 +667,7 @@ static void Hal_GetEfuseDefinition(
case TYPE_AVAILABLE_EFUSE_BYTES_BANK: case TYPE_AVAILABLE_EFUSE_BYTES_BANK:
{ {
u16 *pu2Tmp; u16 *pu2Tmp;
pu2Tmp = (u16 *)pOut; pu2Tmp = pOut;
if (efuseType == EFUSE_WIFI) if (efuseType == EFUSE_WIFI)
*pu2Tmp = (EFUSE_REAL_CONTENT_LEN_8723B-EFUSE_OOB_PROTECT_BYTES); *pu2Tmp = (EFUSE_REAL_CONTENT_LEN_8723B-EFUSE_OOB_PROTECT_BYTES);
...@@ -679,7 +679,7 @@ static void Hal_GetEfuseDefinition( ...@@ -679,7 +679,7 @@ static void Hal_GetEfuseDefinition(
case TYPE_AVAILABLE_EFUSE_BYTES_TOTAL: case TYPE_AVAILABLE_EFUSE_BYTES_TOTAL:
{ {
u16 *pu2Tmp; u16 *pu2Tmp;
pu2Tmp = (u16 *)pOut; pu2Tmp = pOut;
if (efuseType == EFUSE_WIFI) if (efuseType == EFUSE_WIFI)
*pu2Tmp = (EFUSE_REAL_CONTENT_LEN_8723B-EFUSE_OOB_PROTECT_BYTES); *pu2Tmp = (EFUSE_REAL_CONTENT_LEN_8723B-EFUSE_OOB_PROTECT_BYTES);
...@@ -691,7 +691,7 @@ static void Hal_GetEfuseDefinition( ...@@ -691,7 +691,7 @@ static void Hal_GetEfuseDefinition(
case TYPE_EFUSE_MAP_LEN: case TYPE_EFUSE_MAP_LEN:
{ {
u16 *pu2Tmp; u16 *pu2Tmp;
pu2Tmp = (u16 *)pOut; pu2Tmp = pOut;
if (efuseType == EFUSE_WIFI) if (efuseType == EFUSE_WIFI)
*pu2Tmp = EFUSE_MAX_MAP_LEN; *pu2Tmp = EFUSE_MAX_MAP_LEN;
...@@ -703,7 +703,7 @@ static void Hal_GetEfuseDefinition( ...@@ -703,7 +703,7 @@ static void Hal_GetEfuseDefinition(
case TYPE_EFUSE_PROTECT_BYTES_BANK: case TYPE_EFUSE_PROTECT_BYTES_BANK:
{ {
u8 *pu1Tmp; u8 *pu1Tmp;
pu1Tmp = (u8 *)pOut; pu1Tmp = pOut;
if (efuseType == EFUSE_WIFI) if (efuseType == EFUSE_WIFI)
*pu1Tmp = EFUSE_OOB_PROTECT_BYTES; *pu1Tmp = EFUSE_OOB_PROTECT_BYTES;
...@@ -715,7 +715,7 @@ static void Hal_GetEfuseDefinition( ...@@ -715,7 +715,7 @@ static void Hal_GetEfuseDefinition(
case TYPE_EFUSE_CONTENT_LEN_BANK: case TYPE_EFUSE_CONTENT_LEN_BANK:
{ {
u16 *pu2Tmp; u16 *pu2Tmp;
pu2Tmp = (u16 *)pOut; pu2Tmp = pOut;
if (efuseType == EFUSE_WIFI) if (efuseType == EFUSE_WIFI)
*pu2Tmp = EFUSE_REAL_CONTENT_LEN_8723B; *pu2Tmp = EFUSE_REAL_CONTENT_LEN_8723B;
...@@ -727,7 +727,7 @@ static void Hal_GetEfuseDefinition( ...@@ -727,7 +727,7 @@ static void Hal_GetEfuseDefinition(
default: default:
{ {
u8 *pu1Tmp; u8 *pu1Tmp;
pu1Tmp = (u8 *)pOut; pu1Tmp = pOut;
*pu1Tmp = 0; *pu1Tmp = 0;
} }
break; break;
......
...@@ -64,7 +64,7 @@ static void process_link_qual(struct adapter *padapter, union recv_frame *prfram ...@@ -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) 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 */ /* Check RSSI */
/* */ /* */
......
...@@ -190,7 +190,7 @@ static void rtl8723bs_recv_tasklet(void *priv) ...@@ -190,7 +190,7 @@ static void rtl8723bs_recv_tasklet(void *priv)
u8 shift_sz = 0, rx_report_sz = 0; u8 shift_sz = 0, rx_report_sz = 0;
padapter = (struct adapter *)priv; padapter = priv;
pHalData = GET_HAL_DATA(padapter); pHalData = GET_HAL_DATA(padapter);
precvpriv = &padapter->recvpriv; precvpriv = &padapter->recvpriv;
......
...@@ -490,7 +490,7 @@ int rtl8723bs_xmit_thread(void *context) ...@@ -490,7 +490,7 @@ int rtl8723bs_xmit_thread(void *context)
ret = _SUCCESS; ret = _SUCCESS;
padapter = (struct adapter *)context; padapter = context;
pxmitpriv = &padapter->xmitpriv; pxmitpriv = &padapter->xmitpriv;
rtw_sprintf(thread_name, 20, "%s-"ADPT_FMT, thread_name, ADPT_ARG(padapter)); rtw_sprintf(thread_name, 20, "%s-"ADPT_FMT, thread_name, ADPT_ARG(padapter));
......
...@@ -1121,7 +1121,7 @@ void sd_int_dpc(struct adapter *padapter) ...@@ -1121,7 +1121,7 @@ void sd_int_dpc(struct adapter *padapter)
} }
} else { } else {
/* Error handling for malloc fail */ /* 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__); DBG_871X("%s rtw_cbuf_push fail\n", __func__);
_set_workitem(&padapter->evtpriv.c2h_wk); _set_workitem(&padapter->evtpriv.c2h_wk);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment