staging: rtl8188eu: core: Remove useless cast on void pointer
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>
This commit is contained in:
parent
b3d43a3910
commit
60c8991148
|
@ -167,7 +167,7 @@ int rtw_cmd_thread(void *context)
|
||||||
struct cmd_obj *pcmd;
|
struct cmd_obj *pcmd;
|
||||||
u8 (*cmd_hdl)(struct adapter *padapter, u8 *pbuf);
|
u8 (*cmd_hdl)(struct adapter *padapter, u8 *pbuf);
|
||||||
void (*pcmd_callback)(struct adapter *dev, struct cmd_obj *pcmd);
|
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 cmd_priv *pcmdpriv = &(padapter->cmdpriv);
|
||||||
|
|
||||||
allow_signal(SIGTERM);
|
allow_signal(SIGTERM);
|
||||||
|
|
|
@ -45,7 +45,7 @@ int proc_get_write_reg(char *page, char **start,
|
||||||
int proc_set_write_reg(struct file *file, const char __user *buffer,
|
int proc_set_write_reg(struct file *file, const char __user *buffer,
|
||||||
unsigned long count, void *data)
|
unsigned long count, void *data)
|
||||||
{
|
{
|
||||||
struct net_device *dev = (struct net_device *)data;
|
struct net_device *dev = data;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
u32 addr, val, len;
|
u32 addr, val, len;
|
||||||
|
@ -577,7 +577,7 @@ int proc_get_rx_signal(char *page, char **start,
|
||||||
int proc_set_rx_signal(struct file *file, const char __user *buffer,
|
int proc_set_rx_signal(struct file *file, const char __user *buffer,
|
||||||
unsigned long count, void *data)
|
unsigned long count, void *data)
|
||||||
{
|
{
|
||||||
struct net_device *dev = (struct net_device *)data;
|
struct net_device *dev = data;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
u32 is_signal_dbg;
|
u32 is_signal_dbg;
|
||||||
|
@ -627,7 +627,7 @@ int proc_get_ht_enable(char *page, char **start,
|
||||||
int proc_set_ht_enable(struct file *file, const char __user *buffer,
|
int proc_set_ht_enable(struct file *file, const char __user *buffer,
|
||||||
unsigned long count, void *data)
|
unsigned long count, void *data)
|
||||||
{
|
{
|
||||||
struct net_device *dev = (struct net_device *)data;
|
struct net_device *dev = data;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
|
@ -669,7 +669,7 @@ int proc_get_cbw40_enable(char *page, char **start,
|
||||||
int proc_set_cbw40_enable(struct file *file, const char __user *buffer,
|
int proc_set_cbw40_enable(struct file *file, const char __user *buffer,
|
||||||
unsigned long count, void *data)
|
unsigned long count, void *data)
|
||||||
{
|
{
|
||||||
struct net_device *dev = (struct net_device *)data;
|
struct net_device *dev = data;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
|
@ -710,7 +710,7 @@ int proc_get_ampdu_enable(char *page, char **start,
|
||||||
int proc_set_ampdu_enable(struct file *file, const char __user *buffer,
|
int proc_set_ampdu_enable(struct file *file, const char __user *buffer,
|
||||||
unsigned long count, void *data)
|
unsigned long count, void *data)
|
||||||
{
|
{
|
||||||
struct net_device *dev = (struct net_device *)data;
|
struct net_device *dev = data;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
|
@ -771,7 +771,7 @@ int proc_get_rx_stbc(char *page, char **start,
|
||||||
int proc_set_rx_stbc(struct file *file, const char __user *buffer,
|
int proc_set_rx_stbc(struct file *file, const char __user *buffer,
|
||||||
unsigned long count, void *data)
|
unsigned long count, void *data)
|
||||||
{
|
{
|
||||||
struct net_device *dev = (struct net_device *)data;
|
struct net_device *dev = data;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
|
@ -800,7 +800,7 @@ int proc_get_rssi_disp(char *page, char **start,
|
||||||
int proc_set_rssi_disp(struct file *file, const char __user *buffer,
|
int proc_set_rssi_disp(struct file *file, const char __user *buffer,
|
||||||
unsigned long count, void *data)
|
unsigned long count, void *data)
|
||||||
{
|
{
|
||||||
struct net_device *dev = (struct net_device *)data;
|
struct net_device *dev = data;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
u32 enable = 0;
|
u32 enable = 0;
|
||||||
|
|
|
@ -331,56 +331,56 @@ void EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, v
|
||||||
case TYPE_EFUSE_MAX_SECTION:
|
case TYPE_EFUSE_MAX_SECTION:
|
||||||
{
|
{
|
||||||
u8 *pMax_section;
|
u8 *pMax_section;
|
||||||
pMax_section = (u8 *)pOut;
|
pMax_section = pOut;
|
||||||
*pMax_section = EFUSE_MAX_SECTION_88E;
|
*pMax_section = EFUSE_MAX_SECTION_88E;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_EFUSE_REAL_CONTENT_LEN:
|
case TYPE_EFUSE_REAL_CONTENT_LEN:
|
||||||
{
|
{
|
||||||
u16 *pu2Tmp;
|
u16 *pu2Tmp;
|
||||||
pu2Tmp = (u16 *)pOut;
|
pu2Tmp = pOut;
|
||||||
*pu2Tmp = EFUSE_REAL_CONTENT_LEN_88E;
|
*pu2Tmp = EFUSE_REAL_CONTENT_LEN_88E;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_EFUSE_CONTENT_LEN_BANK:
|
case TYPE_EFUSE_CONTENT_LEN_BANK:
|
||||||
{
|
{
|
||||||
u16 *pu2Tmp;
|
u16 *pu2Tmp;
|
||||||
pu2Tmp = (u16 *)pOut;
|
pu2Tmp = pOut;
|
||||||
*pu2Tmp = EFUSE_REAL_CONTENT_LEN_88E;
|
*pu2Tmp = EFUSE_REAL_CONTENT_LEN_88E;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_AVAILABLE_EFUSE_BYTES_BANK:
|
case TYPE_AVAILABLE_EFUSE_BYTES_BANK:
|
||||||
{
|
{
|
||||||
u16 *pu2Tmp;
|
u16 *pu2Tmp;
|
||||||
pu2Tmp = (u16 *)pOut;
|
pu2Tmp = pOut;
|
||||||
*pu2Tmp = (u16)(EFUSE_REAL_CONTENT_LEN_88E-EFUSE_OOB_PROTECT_BYTES_88E);
|
*pu2Tmp = (u16)(EFUSE_REAL_CONTENT_LEN_88E-EFUSE_OOB_PROTECT_BYTES_88E);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_AVAILABLE_EFUSE_BYTES_TOTAL:
|
case TYPE_AVAILABLE_EFUSE_BYTES_TOTAL:
|
||||||
{
|
{
|
||||||
u16 *pu2Tmp;
|
u16 *pu2Tmp;
|
||||||
pu2Tmp = (u16 *)pOut;
|
pu2Tmp = pOut;
|
||||||
*pu2Tmp = (u16)(EFUSE_REAL_CONTENT_LEN_88E-EFUSE_OOB_PROTECT_BYTES_88E);
|
*pu2Tmp = (u16)(EFUSE_REAL_CONTENT_LEN_88E-EFUSE_OOB_PROTECT_BYTES_88E);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_EFUSE_MAP_LEN:
|
case TYPE_EFUSE_MAP_LEN:
|
||||||
{
|
{
|
||||||
u16 *pu2Tmp;
|
u16 *pu2Tmp;
|
||||||
pu2Tmp = (u16 *)pOut;
|
pu2Tmp = pOut;
|
||||||
*pu2Tmp = (u16)EFUSE_MAP_LEN_88E;
|
*pu2Tmp = (u16)EFUSE_MAP_LEN_88E;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_EFUSE_PROTECT_BYTES_BANK:
|
case TYPE_EFUSE_PROTECT_BYTES_BANK:
|
||||||
{
|
{
|
||||||
u8 *pu1Tmp;
|
u8 *pu1Tmp;
|
||||||
pu1Tmp = (u8 *)pOut;
|
pu1Tmp = pOut;
|
||||||
*pu1Tmp = (u8)(EFUSE_OOB_PROTECT_BYTES_88E);
|
*pu1Tmp = (u8)(EFUSE_OOB_PROTECT_BYTES_88E);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
u8 *pu1Tmp;
|
u8 *pu1Tmp;
|
||||||
pu1Tmp = (u8 *)pOut;
|
pu1Tmp = pOut;
|
||||||
*pu1Tmp = 0;
|
*pu1Tmp = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
/* */
|
/* */
|
||||||
void BlinkTimerCallback(void *data)
|
void BlinkTimerCallback(void *data)
|
||||||
{
|
{
|
||||||
struct LED_871x *pLed = (struct LED_871x *)data;
|
struct LED_871x *pLed = data;
|
||||||
struct adapter *padapter = pLed->padapter;
|
struct adapter *padapter = pLed->padapter;
|
||||||
|
|
||||||
if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped))
|
if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped))
|
||||||
|
|
|
@ -1362,7 +1362,7 @@ void rtw_cpwm_event_callback(struct adapter *padapter, u8 *pbuf)
|
||||||
*/
|
*/
|
||||||
void _rtw_join_timeout_handler (void *function_context)
|
void _rtw_join_timeout_handler (void *function_context)
|
||||||
{
|
{
|
||||||
struct adapter *adapter = (struct adapter *)function_context;
|
struct adapter *adapter = function_context;
|
||||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||||
int do_join_r;
|
int do_join_r;
|
||||||
|
|
||||||
|
@ -1404,7 +1404,7 @@ void _rtw_join_timeout_handler (void *function_context)
|
||||||
*/
|
*/
|
||||||
void rtw_scan_timeout_handler (void *function_context)
|
void rtw_scan_timeout_handler (void *function_context)
|
||||||
{
|
{
|
||||||
struct adapter *adapter = (struct adapter *)function_context;
|
struct adapter *adapter = function_context;
|
||||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||||
|
|
||||||
DBG_88E(FUNC_ADPT_FMT" fw_state=%x\n", FUNC_ADPT_ARG(adapter), get_fwstate(pmlmepriv));
|
DBG_88E(FUNC_ADPT_FMT" fw_state=%x\n", FUNC_ADPT_ARG(adapter), get_fwstate(pmlmepriv));
|
||||||
|
|
|
@ -4835,7 +4835,7 @@ void linked_status_chk(struct adapter *padapter)
|
||||||
|
|
||||||
void survey_timer_hdl(void *function_context)
|
void survey_timer_hdl(void *function_context)
|
||||||
{
|
{
|
||||||
struct adapter *padapter = (struct adapter *)function_context;
|
struct adapter *padapter = function_context;
|
||||||
struct cmd_obj *ph2c;
|
struct cmd_obj *ph2c;
|
||||||
struct sitesurvey_parm *psurveyPara;
|
struct sitesurvey_parm *psurveyPara;
|
||||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||||
|
@ -4912,7 +4912,7 @@ void link_timer_hdl(void *function_context)
|
||||||
|
|
||||||
void addba_timer_hdl(void *function_context)
|
void addba_timer_hdl(void *function_context)
|
||||||
{
|
{
|
||||||
struct sta_info *psta = (struct sta_info *)function_context;
|
struct sta_info *psta = function_context;
|
||||||
struct ht_priv *phtpriv;
|
struct ht_priv *phtpriv;
|
||||||
|
|
||||||
if (!psta)
|
if (!psta)
|
||||||
|
|
|
@ -284,7 +284,7 @@ exit:
|
||||||
|
|
||||||
static void pwr_state_check_handler(void *FunctionContext)
|
static void pwr_state_check_handler(void *FunctionContext)
|
||||||
{
|
{
|
||||||
struct adapter *padapter = (struct adapter *)FunctionContext;
|
struct adapter *padapter = FunctionContext;
|
||||||
rtw_ps_cmd(padapter);
|
rtw_ps_cmd(padapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1949,7 +1949,7 @@ _err_exit:
|
||||||
|
|
||||||
void rtw_reordering_ctrl_timeout_handler(void *pcontext)
|
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 adapter *padapter = preorder_ctrl->padapter;
|
||||||
struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue