From: Tapasweni Pathak Date: Thu, 30 Oct 2014 11:33:08 +0000 (+0530) Subject: staging: rtl8188eu: core: Remove useless cast on void pointer X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=60c8991148d8ad7cdbfd210a42db721eccd58d26;p=linux-beck.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 350d2e73b419..7731cdb72b22 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -167,7 +167,7 @@ int rtw_cmd_thread(void *context) struct cmd_obj *pcmd; 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); allow_signal(SIGTERM); diff --git a/drivers/staging/rtl8188eu/core/rtw_debug.c b/drivers/staging/rtl8188eu/core/rtw_debug.c index 1f72f7d8097e..bc3fe10ff247 100644 --- a/drivers/staging/rtl8188eu/core/rtw_debug.c +++ b/drivers/staging/rtl8188eu/core/rtw_debug.c @@ -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, 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); char tmp[32]; 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, 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); char tmp[32]; 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, 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 registry_priv *pregpriv = &padapter->registrypriv; 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, 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 registry_priv *pregpriv = &padapter->registrypriv; 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, 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 registry_priv *pregpriv = &padapter->registrypriv; 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, 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 registry_priv *pregpriv = &padapter->registrypriv; 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, 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); char tmp[32]; u32 enable = 0; diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index bc897da8c103..31986670b7f0 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -331,56 +331,56 @@ void EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, v case TYPE_EFUSE_MAX_SECTION: { u8 *pMax_section; - pMax_section = (u8 *)pOut; + pMax_section = pOut; *pMax_section = EFUSE_MAX_SECTION_88E; } break; case TYPE_EFUSE_REAL_CONTENT_LEN: { u16 *pu2Tmp; - pu2Tmp = (u16 *)pOut; + pu2Tmp = pOut; *pu2Tmp = EFUSE_REAL_CONTENT_LEN_88E; } break; case TYPE_EFUSE_CONTENT_LEN_BANK: { u16 *pu2Tmp; - pu2Tmp = (u16 *)pOut; + pu2Tmp = pOut; *pu2Tmp = EFUSE_REAL_CONTENT_LEN_88E; } break; case TYPE_AVAILABLE_EFUSE_BYTES_BANK: { u16 *pu2Tmp; - pu2Tmp = (u16 *)pOut; + pu2Tmp = pOut; *pu2Tmp = (u16)(EFUSE_REAL_CONTENT_LEN_88E-EFUSE_OOB_PROTECT_BYTES_88E); } break; case TYPE_AVAILABLE_EFUSE_BYTES_TOTAL: { u16 *pu2Tmp; - pu2Tmp = (u16 *)pOut; + pu2Tmp = pOut; *pu2Tmp = (u16)(EFUSE_REAL_CONTENT_LEN_88E-EFUSE_OOB_PROTECT_BYTES_88E); } break; case TYPE_EFUSE_MAP_LEN: { u16 *pu2Tmp; - pu2Tmp = (u16 *)pOut; + pu2Tmp = pOut; *pu2Tmp = (u16)EFUSE_MAP_LEN_88E; } break; case TYPE_EFUSE_PROTECT_BYTES_BANK: { u8 *pu1Tmp; - pu1Tmp = (u8 *)pOut; + pu1Tmp = pOut; *pu1Tmp = (u8)(EFUSE_OOB_PROTECT_BYTES_88E); } break; default: { u8 *pu1Tmp; - pu1Tmp = (u8 *)pOut; + pu1Tmp = pOut; *pu1Tmp = 0; } break; diff --git a/drivers/staging/rtl8188eu/core/rtw_led.c b/drivers/staging/rtl8188eu/core/rtw_led.c index 384be22052e5..2aa62517e4a2 100644 --- a/drivers/staging/rtl8188eu/core/rtw_led.c +++ b/drivers/staging/rtl8188eu/core/rtw_led.c @@ -28,7 +28,7 @@ /* */ void BlinkTimerCallback(void *data) { - struct LED_871x *pLed = (struct LED_871x *)data; + struct LED_871x *pLed = data; struct adapter *padapter = pLed->padapter; if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped)) diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c index b4e8504b34ed..dec26a89c356 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c @@ -1362,7 +1362,7 @@ void rtw_cpwm_event_callback(struct adapter *padapter, u8 *pbuf) */ 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; int do_join_r; @@ -1404,7 +1404,7 @@ void _rtw_join_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; DBG_88E(FUNC_ADPT_FMT" fw_state=%x\n", FUNC_ADPT_ARG(adapter), get_fwstate(pmlmepriv)); diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index 5ba5099ec20d..8bb490820557 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c @@ -4835,7 +4835,7 @@ void linked_status_chk(struct adapter *padapter) void survey_timer_hdl(void *function_context) { - struct adapter *padapter = (struct adapter *)function_context; + struct adapter *padapter = function_context; struct cmd_obj *ph2c; struct sitesurvey_parm *psurveyPara; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; @@ -4912,7 +4912,7 @@ void link_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; if (!psta) diff --git a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c index 27ed83cca193..768dbeee94c4 100644 --- a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c @@ -284,7 +284,7 @@ exit: static void pwr_state_check_handler(void *FunctionContext) { - struct adapter *padapter = (struct adapter *)FunctionContext; + struct adapter *padapter = FunctionContext; rtw_ps_cmd(padapter); } diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index 4d56dbad2a7d..53a054c189e4 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -1949,7 +1949,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;