mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vihas Makwana <makvihas@gmail.com>
To: Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Michael Straube <straube.linux@gmail.com>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Pavel Skripkin <paskripkin@gmail.com>,
	Vihas Makwana <makvihas@gmail.com>
Subject: [PATCH 2/6] staging: r8188eu: drop unnecessary wrapper rtw_init_cmd_priv
Date: Sun, 10 Apr 2022 22:01:13 +0530	[thread overview]
Message-ID: <20220410163117.3964-3-makvihas@gmail.com> (raw)
In-Reply-To: <20220410163117.3964-1-makvihas@gmail.com>

Remove the unnecessary wrapper. The logic of rtw_init_cmd_priv can
be moved to _rtw_init_cmd_priv.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
 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 4d88bc847..d843e9997 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -15,7 +15,7 @@
  * No irqsave is necessary.
  */
 
-static int _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
+int _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
 {
 	int res = _SUCCESS;
 
@@ -139,15 +139,6 @@ static struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue)
 	return obj;
 }
 
-u32	rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
-{
-	u32	res;
-
-	res = _rtw_init_cmd_priv(pcmdpriv);
-
-	return res;
-}
-
 u32 rtw_init_evt_priv(struct evt_priv *pevtpriv)
 {
 	int	res;
diff --git a/drivers/staging/r8188eu/include/rtw_cmd.h b/drivers/staging/r8188eu/include/rtw_cmd.h
index d3a20dc23..ab47d3785 100644
--- a/drivers/staging/r8188eu/include/rtw_cmd.h
+++ b/drivers/staging/r8188eu/include/rtw_cmd.h
@@ -82,7 +82,7 @@ void rtw_free_cmd_obj(struct cmd_obj *pcmd);
 
 int rtw_cmd_thread(void *context);
 
-u32 rtw_init_cmd_priv(struct cmd_priv *pcmdpriv);
+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);
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index 702e5b350..c611e9246 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -466,7 +466,7 @@ u8 rtw_reset_drv_sw(struct adapter *padapter)
 
 u8 rtw_init_drv_sw(struct adapter *padapter)
 {
-	if ((rtw_init_cmd_priv(&padapter->cmdpriv)) == _FAIL) {
+	if ((_rtw_init_cmd_priv(&padapter->cmdpriv)) == _FAIL) {
 		dev_err(dvobj_to_dev(padapter->dvobj), "rtw_init_cmd_priv failed\n");
 		return _FAIL;
 	}
-- 
2.30.2


  parent reply	other threads:[~2022-04-10 16:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-10 16:31 [PATCH 0/6] drop some unnecessary wrappers Vihas Makwana
2022-04-10 16:31 ` [PATCH 1/6] staging: r8188eu: drop unnecessary wrapper rtw_free_cmd_priv Vihas Makwana
2022-04-10 17:07   ` Joe Perches
2022-04-10 17:38     ` Vihas Makwana
2022-04-11  8:06       ` Dan Carpenter
2022-04-10 16:31 ` Vihas Makwana [this message]
2022-04-10 16:31 ` [PATCH 3/6] staging: r8188eu: drop unnecessary wrapper rtw_init_evt_priv Vihas Makwana
2022-04-10 16:31 ` [PATCH 4/6] staging: r8188eu: drop unnecessary wrapper rtw_dequeue_cmd Vihas Makwana
2022-04-10 16:31 ` [PATCH 5/6] staging: r8188eu: drop unnecessary wrapper rtw_init_mlme_priv Vihas Makwana
2022-04-10 16:31 ` [PATCH 6/6] staging: r8188eu: drop unnecessary wrapper rtw_free_mlme_priv Vihas Makwana

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220410163117.3964-3-makvihas@gmail.com \
    --to=makvihas@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=paskripkin@gmail.com \
    --cc=phil@philpotter.co.uk \
    --cc=straube.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®