2022-04-11 04:14:22

by Vihas Makwana

[permalink] [raw]
Subject: [PATCH 3/6] staging: r8188eu: drop unnecessary wrapper rtw_init_evt_priv

Remove the unnecessary wrapper. The logic of rtw_init_evt_priv can
be moved to _rtw_init_evt_priv.

Signed-off-by: Vihas Makwana <[email protected]>
---
drivers/staging/r8188eu/core/rtw_cmd.c | 11 +----------
drivers/staging/r8188eu/include/rtw_cmd.h | 2 +-
drivers/staging/r8188eu/os_dep/os_intfs.c | 2 +-
3 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index d843e9997..ac6e710e5 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -58,7 +58,7 @@ int _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)

static void c2h_wk_callback(struct work_struct *work);

-static int _rtw_init_evt_priv(struct evt_priv *pevtpriv)
+int _rtw_init_evt_priv(struct evt_priv *pevtpriv)
{
int res = _SUCCESS;

@@ -139,15 +139,6 @@ static struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue)
return obj;
}

-u32 rtw_init_evt_priv(struct evt_priv *pevtpriv)
-{
- int res;
-
- res = _rtw_init_evt_priv(pevtpriv);
-
- return res;
-}
-
static int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
{
u8 bAllow = false; /* set to true to allow enqueuing cmd when hw_init_completed is false */
diff --git a/drivers/staging/r8188eu/include/rtw_cmd.h b/drivers/staging/r8188eu/include/rtw_cmd.h
index ab47d3785..7edce0f88 100644
--- a/drivers/staging/r8188eu/include/rtw_cmd.h
+++ b/drivers/staging/r8188eu/include/rtw_cmd.h
@@ -85,7 +85,7 @@ int rtw_cmd_thread(void *context);
int _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv);
void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv);

-u32 rtw_init_evt_priv(struct evt_priv *pevtpriv);
+int _rtw_init_evt_priv(struct evt_priv *pevtpriv);
void rtw_free_evt_priv(struct evt_priv *pevtpriv);
void rtw_evt_notify_isr(struct evt_priv *pevtpriv);
u8 p2p_protocol_wk_cmd(struct adapter *padapter, int intCmdType);
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index c611e9246..f041c3d87 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -473,7 +473,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter)

padapter->cmdpriv.padapter = padapter;

- if ((rtw_init_evt_priv(&padapter->evtpriv)) == _FAIL) {
+ if ((_rtw_init_evt_priv(&padapter->evtpriv)) == _FAIL) {
dev_err(dvobj_to_dev(padapter->dvobj), "rtw_init_evt_priv failed\n");
goto free_cmd_priv;
}
--
2.30.2