[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220411102136.14937-2-makvihas@gmail.com>
Date: Mon, 11 Apr 2022 15:51:30 +0530
From: Vihas Makwana <makvihas@...il.com>
To: Larry Finger <Larry.Finger@...inger.net>,
Phillip Potter <phil@...lpotter.co.uk>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Michael Straube <straube.linux@...il.com>
Cc: linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
Dan Carpenter <dan.carpenter@...cle.com>,
Pavel Skripkin <paskripkin@...il.com>,
Vihas Makwana <makvihas@...il.com>
Subject: [PATCH v2 1/7] staging: r8188eu: drop unnecessary wrapper _rtw_free_cmd_priv
Drop unnecessary wrapper _rtw_free_cmd_priv and move its logic to
rtw_free_cmd_priv.
Signed-off-by: Vihas Makwana <makvihas@...il.com>
---
drivers/staging/r8188eu/core/rtw_cmd.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index f036a980e..d53217900 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -87,14 +87,6 @@ void rtw_free_evt_priv(struct evt_priv *pevtpriv)
}
}
-static void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
-{
- if (pcmdpriv) {
- kfree(pcmdpriv->cmd_allocated_buf);
- kfree(pcmdpriv->rsp_allocated_buf);
- }
-}
-
/* Calling Context:
*
* rtw_enqueue_cmd can only be called between kernel thread,
@@ -159,7 +151,10 @@ u32 rtw_init_evt_priv(struct evt_priv *pevtpriv)
void rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
{
- _rtw_free_cmd_priv(pcmdpriv);
+ if (pcmdpriv) {
+ kfree(pcmdpriv->cmd_allocated_buf);
+ kfree(pcmdpriv->rsp_allocated_buf);
+ }
}
static int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
--
2.30.2
Powered by blists - more mailing lists