Staging: Remove unused functions
cover Staging: Remove unused functions
This patchset removes some unused functions and their prototypes since they are not being called anywhere in the kernel.
Grepped to find the occurences.
Bhumika Goyal (3):
Staging: rtl8712: Remove function r8712_SetTxAGCOffset and
mp_start_joinbss
Staging: rtl8188eu: Remove function rtw_freq2ch
Staging: rtl8712: Remove function r8712_setptm_cmd and
r8712_gettssi_cmd
drivers/staging/rtl8188eu/core/rtw_rf.c | 17 ----------- drivers/staging/rtl8188eu/include/rtw_rf.h | 1 - drivers/staging/rtl8712/rtl871x_cmd.c | 47 ------------------------------ drivers/staging/rtl8712/rtl871x_cmd.h | 2 -- drivers/staging/rtl8712/rtl871x_mp.c | 12 -------- drivers/staging/rtl8712/rtl871x_mp.h | 1 - drivers/staging/rtl8712/rtl871x_mp_ioctl.c | 16 ---------- drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 2 -- 8 files changed, 98 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/3 Staging: rtl8712: Remove function r8712_SetTxAGCOffset and mp_start_joinbss
The functions r8712_SetTxAGCOffset and mp_start_joinbss are not used anywhere in the kernel so remove their definitions and prototypes.
--- drivers/staging/rtl8712/rtl871x_mp.c | 12 ------------ drivers/staging/rtl8712/rtl871x_mp.h | 1 - drivers/staging/rtl8712/rtl871x_mp_ioctl.c | 16 ---------------- drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 2 -- 4 files changed, 31 deletions(-)
drivers/staging/rtl8712/rtl871x_mp.c +0 -12
@@ -323,18 +323,6 @@ void r8712_SetTxPower(struct _adapter *pAdapter)SetOFDMTxPower (pAdapter, TxPower); } -void r8712_SetTxAGCOffset (struct _adapter *pAdapter,u32 ulTxAGCOffset) -{ -u32 TxAGCOffset_B, TxAGCOffset_C, TxAGCOffset_D, tmpAGC; - - TxAGCOffset_B = (ulTxAGCOffset &0x000000ff ); - TxAGCOffset_C = (ulTxAGCOffset &0x0000ff00 ) >>8 ; - TxAGCOffset_D = (ulTxAGCOffset &0x00ff0000 ) >>16 ; - tmpAGC = (TxAGCOffset_D <<8 | TxAGCOffset_C <<4 | TxAGCOffset_B); -set_bb_reg (pAdapter, rFPGA0_TxGainStage, - (bXBTxAGC | bXCTxAGC | bXDTxAGC), tmpAGC); -} -void r8712_SetDataRate (struct _adapter *pAdapter) {u8 path =RF_PATH_A ;
drivers/staging/rtl8712/rtl871x_mp.h +0 -1
@@ -268,7 +268,6 @@ u8 r8712_set_rf_reg(struct _adapter *Adapter, u8 path, u8 offset,void r8712_SetChannel (struct _adapter *pAdapter);void r8712_SetTxPower (struct _adapter *pAdapte); -void r8712_SetTxAGCOffset (struct _adapter *pAdapter,u32 ulTxAGCOffset);void r8712_SetDataRate (struct _adapter *pAdapter);void r8712_SwitchBandwidth (struct _adapter *pAdapter);void r8712_SwitchAntenna (struct _adapter *pAdapter);
drivers/staging/rtl8712/rtl871x_mp_ioctl.c +0 -16
@@ -243,22 +243,6 @@ end_of_mp_stop_test:return _SUCCESS; } -int mp_start_joinbss (struct _adapter *padapter,struct ndis_802_11_ssid *pssid) -{ -struct mp_priv *pmppriv = &padapter->mppriv; -struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -unsigned char res = _SUCCESS; - -if (!check_fwstate (pmlmepriv,WIFI_MP_STATE )) -return _FAIL; -if (!check_fwstate (pmlmepriv, _FW_LINKED)) -return _FAIL; -_clr_fwstate_ (pmlmepriv, _FW_LINKED); - res =r8712_setassocsta_cmd (padapter, pmppriv->network_macaddr); -set_fwstate (pmlmepriv, _FW_UNDER_LINKING); -return res; -} -uint oid_rt_pro_set_data_rate_hdl (struct oid_par_priv *poid_par_priv) {
drivers/staging/rtl8712/rtl871x_mp_ioctl.h +0 -2
@@ -83,8 +83,6 @@ struct DR_VARIABLE_STRUCT {u32 variable; }; -int mp_start_joinbss (struct _adapter *padapter,struct ndis_802_11_ssid *pssid); -/* oid_rtl_seg_87_11_00 */ uint oid_rt_pro_read_register_hdl (struct oid_par_priv *poid_par_priv);uint oid_rt_pro_write_register_hdl (struct oid_par_priv *poid_par_priv);
Signature · 1 line
1.9.1
Greg KH
maintainerRe: [Outreachy kernel] [PATCH 1/3] Staging: rtl8712: Remove function r8712_SetTxAGCOffset and mp_start_joinbss
Quoted 10 lines · Bhumika Goyal
The functions
r8712_SetTxAGCOffsetandmp_start_joinbssare not used anywhere in the kernel so remove their definitions and prototypes.Signed-off-by Bhumika Goyal <[email protected]>--- drivers/staging/rtl8712/rtl871x_mp.c | 12 ------------ drivers/staging/rtl8712/rtl871x_mp.h | 1 - drivers/staging/rtl8712/rtl871x_mp_ioctl.c | 16 ---------------- drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 2 -- 4 files changed, 31 deletions(-)
Did not apply to my tree :(
PATCH 2/3 Staging: rtl8188eu: Remove function rtw_freq2ch
In reply to Bhumika GoyalRemove function rtw_freq2ch as it is never used anywhere in the kernel. Also, remove the function prototype.
--- drivers/staging/rtl8188eu/core/rtw_rf.c | 17 ----------------- drivers/staging/rtl8188eu/include/rtw_rf.h | 1 - 2 files changed, 18 deletions(-)
drivers/staging/rtl8188eu/core/rtw_rf.c +0 -17
@@ -70,20 +70,3 @@ u32 rtw_ch2freq(u32 channel)return freq; } - -u32 rtw_freq2ch (u32 freq) -{ -u8 i; -u32 ch =0 ; - -for (i =0 ; i < ch_freq_map_num; i++) { -if (freq == ch_freq_map[i].frequency) { - ch = ch_freq_map[i].channel; -break ; - } - } -if (i == ch_freq_map_num) - ch =1 ; - -return ch; -}
drivers/staging/rtl8188eu/include/rtw_rf.h +0 -1
@@ -140,7 +140,6 @@ enum rt_rf_type_def { };u32 rtw_ch2freq (u32 ch); -u32 rtw_freq2ch (u32 freq);#endif /* _RTL8711_RF_H_ */
Signature · 1 line
1.9.1
PATCH 3/3 Staging: rtl8712: Remove function r8712_setptm_cmd and r8712_gettssi_cmd
In reply to Bhumika GoyalThe function r8712_setptm_cmd and r8712_gettssi_cmd are not used anywhere in the kernel so remove them. Also, remove their function prototypes.
--- drivers/staging/rtl8712/rtl871x_cmd.c | 47 ----------------------------------- drivers/staging/rtl8712/rtl871x_cmd.h | 2 -- 2 files changed, 49 deletions(-)
drivers/staging/rtl8712/rtl871x_cmd.c +0 -47
@@ -315,27 +315,6 @@ u8 r8712_setbasicrate_cmd(struct _adapter *padapter, u8 *rateset)return _SUCCESS; } -/* power tracking mechanism setting */ -u8 r8712_setptm_cmd (struct _adapter *padapter,u8 type) -{ -struct cmd_obj *ph2c; -struct writePTM_parm *pwriteptmparm; -struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - - ph2c =kmalloc (sizeof (*ph2c),GFP_ATOMIC ); -if (ph2c ==NULL ) -return _FAIL; - pwriteptmparm =kmalloc (sizeof (*pwriteptmparm),GFP_ATOMIC ); -if (pwriteptmparm ==NULL ) { -kfree (ph2c); -return _FAIL; - } -init_h2fwcmd_w_parm_no_rsp (ph2c, pwriteptmparm,GEN_CMD_CODE (_SetPT)); - pwriteptmparm->type = type; -r8712_enqueue_cmd (pcmdpriv, ph2c); -return _SUCCESS; -} -u8 r8712_setfwdig_cmd (struct _adapter *padapter,u8 type) {struct cmd_obj *ph2c;
@@ -730,32 +709,6 @@ u8 r8712_setrttbl_cmd(struct _adapter *padapter,return _SUCCESS; } -u8 r8712_gettssi_cmd (struct _adapter *padapter,u8 offset,u8 *pval) -{ -struct cmd_priv *pcmdpriv = &padapter->cmdpriv; -struct cmd_obj *ph2c; -struct readTSSI_parm *prdtssiparm; - - ph2c =kmalloc (sizeof (*ph2c),GFP_ATOMIC ); -if (ph2c ==NULL ) -return _FAIL; - prdtssiparm =kmalloc (sizeof (*prdtssiparm),GFP_ATOMIC ); -if (prdtssiparm ==NULL ) { -kfree (ph2c); -return _FAIL; - } -INIT_LIST_HEAD (&ph2c->list); - ph2c->cmdcode =GEN_CMD_CODE (_ReadTSSI); - ph2c->parmbuf = (unsigned char *)prdtssiparm; - ph2c->cmdsz =sizeof (struct readTSSI_parm ); - ph2c->rsp = pval; - ph2c->rspsz =sizeof (struct readTSSI_rsp ); - - prdtssiparm->offset = offset; -r8712_enqueue_cmd (pcmdpriv, ph2c); -return _SUCCESS; -} -u8 r8712_setMacAddr_cmd (struct _adapter *padapter,u8 *mac_addr) {struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
drivers/staging/rtl8712/rtl871x_cmd.h +0 -2
@@ -736,8 +736,6 @@ u8 r8712_setrfintfs_cmd(struct _adapter *padapter, u8 mode);u8 r8712_setrfreg_cmd (struct _adapter *padapter,u8 offset,u32 val);u8 r8712_setrttbl_cmd (struct _adapter *padapter,struct setratable_parm *prate_table); -u8 r8712_gettssi_cmd (struct _adapter *padapter,u8 offset,u8 *pval); -u8 r8712_setptm_cmd (struct _adapter *padapter,u8 type);u8 r8712_setfwdig_cmd (struct _adapter *padapter,u8 type);u8 r8712_setfwra_cmd (struct _adapter *padapter,u8 type);u8 r8712_addbareq_cmd (struct _adapter *padapter,u8 tid);
Signature · 1 line
1.9.1