All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Staging: Remove unused functions
@ 2016-03-11 10:23 Bhumika Goyal
  2016-03-11 10:23 ` [PATCH 1/3] Staging: rtl8712: Remove function r8712_SetTxAGCOffset and mp_start_joinbss Bhumika Goyal
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Bhumika Goyal @ 2016-03-11 10:23 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Bhumika Goyal

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(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] Staging: rtl8712: Remove function r8712_SetTxAGCOffset and mp_start_joinbss
  2016-03-11 10:23 [PATCH 0/3] Staging: Remove unused functions Bhumika Goyal
@ 2016-03-11 10:23 ` Bhumika Goyal
  2016-03-11 18:33   ` [Outreachy kernel] " Greg KH
  2016-03-11 10:23 ` [PATCH 2/3] Staging: rtl8188eu: Remove function rtw_freq2ch Bhumika Goyal
  2016-03-11 10:23 ` [PATCH 3/3] Staging: rtl8712: Remove function r8712_setptm_cmd and r8712_gettssi_cmd Bhumika Goyal
  2 siblings, 1 reply; 5+ messages in thread
From: Bhumika Goyal @ 2016-03-11 10:23 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Bhumika Goyal

The functions r8712_SetTxAGCOffset and mp_start_joinbss are not used
anywhere in the kernel so remove their definitions and prototypes.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 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(-)

diff --git a/drivers/staging/rtl8712/rtl871x_mp.c b/drivers/staging/rtl8712/rtl871x_mp.c
index 9b5a4e7..12e140b 100644
--- a/drivers/staging/rtl8712/rtl871x_mp.c
+++ b/drivers/staging/rtl8712/rtl871x_mp.c
@@ -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;
diff --git a/drivers/staging/rtl8712/rtl871x_mp.h b/drivers/staging/rtl8712/rtl871x_mp.h
index 3f3b2e7..24be08b 100644
--- a/drivers/staging/rtl8712/rtl871x_mp.h
+++ b/drivers/staging/rtl8712/rtl871x_mp.h
@@ -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);
diff --git a/drivers/staging/rtl8712/rtl871x_mp_ioctl.c b/drivers/staging/rtl8712/rtl871x_mp_ioctl.c
index b98a596..315cb0b 100644
--- a/drivers/staging/rtl8712/rtl871x_mp_ioctl.c
+++ b/drivers/staging/rtl8712/rtl871x_mp_ioctl.c
@@ -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)
 {
diff --git a/drivers/staging/rtl8712/rtl871x_mp_ioctl.h b/drivers/staging/rtl8712/rtl871x_mp_ioctl.h
index 8e7c7f8..5dacf82 100644
--- a/drivers/staging/rtl8712/rtl871x_mp_ioctl.h
+++ b/drivers/staging/rtl8712/rtl871x_mp_ioctl.h
@@ -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);
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] Staging: rtl8188eu: Remove function rtw_freq2ch
  2016-03-11 10:23 [PATCH 0/3] Staging: Remove unused functions Bhumika Goyal
  2016-03-11 10:23 ` [PATCH 1/3] Staging: rtl8712: Remove function r8712_SetTxAGCOffset and mp_start_joinbss Bhumika Goyal
@ 2016-03-11 10:23 ` Bhumika Goyal
  2016-03-11 10:23 ` [PATCH 3/3] Staging: rtl8712: Remove function r8712_setptm_cmd and r8712_gettssi_cmd Bhumika Goyal
  2 siblings, 0 replies; 5+ messages in thread
From: Bhumika Goyal @ 2016-03-11 10:23 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Bhumika Goyal

Remove function rtw_freq2ch as it is never used anywhere in the kernel.
Also, remove the function prototype.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_rf.c    | 17 -----------------
 drivers/staging/rtl8188eu/include/rtw_rf.h |  1 -
 2 files changed, 18 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_rf.c b/drivers/staging/rtl8188eu/core/rtw_rf.c
index 6983c57..4ad2d8f 100644
--- a/drivers/staging/rtl8188eu/core/rtw_rf.c
+++ b/drivers/staging/rtl8188eu/core/rtw_rf.c
@@ -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;
-}
diff --git a/drivers/staging/rtl8188eu/include/rtw_rf.h b/drivers/staging/rtl8188eu/include/rtw_rf.h
index 2df8837..35f61be 100644
--- a/drivers/staging/rtl8188eu/include/rtw_rf.h
+++ b/drivers/staging/rtl8188eu/include/rtw_rf.h
@@ -140,7 +140,6 @@ enum rt_rf_type_def {
 };
 
 u32 rtw_ch2freq(u32 ch);
-u32 rtw_freq2ch(u32 freq);
 
 
 #endif /* _RTL8711_RF_H_ */
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] Staging: rtl8712: Remove function r8712_setptm_cmd and r8712_gettssi_cmd
  2016-03-11 10:23 [PATCH 0/3] Staging: Remove unused functions Bhumika Goyal
  2016-03-11 10:23 ` [PATCH 1/3] Staging: rtl8712: Remove function r8712_SetTxAGCOffset and mp_start_joinbss Bhumika Goyal
  2016-03-11 10:23 ` [PATCH 2/3] Staging: rtl8188eu: Remove function rtw_freq2ch Bhumika Goyal
@ 2016-03-11 10:23 ` Bhumika Goyal
  2 siblings, 0 replies; 5+ messages in thread
From: Bhumika Goyal @ 2016-03-11 10:23 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Bhumika Goyal

The function r8712_setptm_cmd and r8712_gettssi_cmd are not used
anywhere in the kernel so remove them. Also, remove their function
prototypes.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/staging/rtl8712/rtl871x_cmd.c | 47 -----------------------------------
 drivers/staging/rtl8712/rtl871x_cmd.h |  2 --
 2 files changed, 49 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c
index 5875677..86136cc 100644
--- a/drivers/staging/rtl8712/rtl871x_cmd.c
+++ b/drivers/staging/rtl8712/rtl871x_cmd.c
@@ -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;
diff --git a/drivers/staging/rtl8712/rtl871x_cmd.h b/drivers/staging/rtl8712/rtl871x_cmd.h
index 818cd88..e4a2a50 100644
--- a/drivers/staging/rtl8712/rtl871x_cmd.h
+++ b/drivers/staging/rtl8712/rtl871x_cmd.h
@@ -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);
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Outreachy kernel] [PATCH 1/3] Staging: rtl8712: Remove function r8712_SetTxAGCOffset and mp_start_joinbss
  2016-03-11 10:23 ` [PATCH 1/3] Staging: rtl8712: Remove function r8712_SetTxAGCOffset and mp_start_joinbss Bhumika Goyal
@ 2016-03-11 18:33   ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2016-03-11 18:33 UTC (permalink / raw)
  To: Bhumika Goyal; +Cc: outreachy-kernel

On Fri, Mar 11, 2016 at 03:53:55PM +0530, Bhumika Goyal wrote:
> The functions r8712_SetTxAGCOffset and mp_start_joinbss are not used
> anywhere in the kernel so remove their definitions and prototypes.
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>  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 :(


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-11 18:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-11 10:23 [PATCH 0/3] Staging: Remove unused functions Bhumika Goyal
2016-03-11 10:23 ` [PATCH 1/3] Staging: rtl8712: Remove function r8712_SetTxAGCOffset and mp_start_joinbss Bhumika Goyal
2016-03-11 18:33   ` [Outreachy kernel] " Greg KH
2016-03-11 10:23 ` [PATCH 2/3] Staging: rtl8188eu: Remove function rtw_freq2ch Bhumika Goyal
2016-03-11 10:23 ` [PATCH 3/3] Staging: rtl8712: Remove function r8712_setptm_cmd and r8712_gettssi_cmd Bhumika Goyal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.