mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martin Kaiser <martin@kaiser.cx>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>,
	Michael Straube <straube.linux@gmail.com>,
	Pavel Skripkin <paskripkin@gmail.com>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Martin Kaiser <martin@kaiser.cx>
Subject: [PATCH 23/23] staging: r8188eu: merge rtw_free_hwxmits into its only caller
Date: Mon, 23 Jan 2023 21:53:42 +0100	[thread overview]
Message-ID: <20230123205342.229589-24-martin@kaiser.cx> (raw)
In-Reply-To: <20230123205342.229589-1-martin@kaiser.cx>

rtw_free_hwxmits is called only by _rtw_free_xmit_priv. We can merge the
two functions and make the code a bit shorter.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/core/rtw_xmit.c    | 11 +----------
 drivers/staging/r8188eu/include/rtw_xmit.h |  1 -
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 3752d4fddd11..f50e10f0d51f 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -281,7 +281,7 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
 
 	vfree(pxmitpriv->pallocated_xmit_extbuf);
 
-	rtw_free_hwxmits(padapter);
+	kfree(pxmitpriv->hwxmits);
 
 	mutex_destroy(&pxmitpriv->ack_tx_mutex);
 }
@@ -1475,15 +1475,6 @@ int rtw_alloc_hwxmits(struct adapter *padapter)
 	return 0;
 }
 
-void rtw_free_hwxmits(struct adapter *padapter)
-{
-	struct hw_xmit *hwxmits;
-	struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
-
-	hwxmits = pxmitpriv->hwxmits;
-	kfree(hwxmits);
-}
-
 static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
 {
 	struct sk_buff *skb = *pskb;
diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h
index 33c3031de2c4..d8808e68f778 100644
--- a/drivers/staging/r8188eu/include/rtw_xmit.h
+++ b/drivers/staging/r8188eu/include/rtw_xmit.h
@@ -328,7 +328,6 @@ s32 rtw_txframes_sta_ac_pending(struct adapter *padapter,
 int _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter);
 void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv);
 int rtw_alloc_hwxmits(struct adapter *padapter);
-void rtw_free_hwxmits(struct adapter *padapter);
 s32 rtw_xmit(struct adapter *padapter, struct sk_buff **pkt);
 
 int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_frame *pxmitframe);
-- 
2.30.2


  parent reply	other threads:[~2023-01-23 20:57 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23 20:53 [PATCH 00/23] staging: r8188eu: some more xmit cleanups Martin Kaiser
2023-01-23 20:53 ` [PATCH 01/23] staging: r8188eu: we use a constant number of hw_xmit entries Martin Kaiser
2023-01-23 20:53 ` [PATCH 02/23] staging: r8188eu: pass struct adapter to usb_write Martin Kaiser
2023-01-23 20:53 ` [PATCH 03/23] staging: r8188eu: remove struct intf_hdl Martin Kaiser
2023-01-23 20:53 ` [PATCH 04/23] staging: r8188eu: remove struct intf_priv Martin Kaiser
2023-01-23 20:53 ` [PATCH 05/23] staging: r8188eu: simplify the sta loop in rtw_dequeue_xframe Martin Kaiser
2023-01-23 20:53 ` [PATCH 06/23] staging: r8188eu: simplify the code to initialise inx Martin Kaiser
2023-01-23 20:53 ` [PATCH 07/23] staging: r8188eu: remove an obsolete comment Martin Kaiser
2023-01-23 20:53 ` [PATCH 08/23] staging: r8188eu: remove unused function parameter Martin Kaiser
2023-01-23 20:53 ` [PATCH 09/23] staging: r8188eu: remove dead assignment Martin Kaiser
2023-01-23 20:53 ` [PATCH 10/23] staging: r8188eu: use list_empty Martin Kaiser
2023-01-23 20:53 ` [PATCH 11/23] staging: r8188eu: simplify dequeue_one_xmitframe Martin Kaiser
2023-01-23 20:53 ` [PATCH 12/23] staging: r8188eu: remove redundant parameter Martin Kaiser
2023-01-23 20:53 ` [PATCH 13/23] staging: r8188eu: make rtw_chk_hi_queue_cmd a void function Martin Kaiser
2023-01-23 20:53 ` [PATCH 14/23] staging: r8188eu: decrement qcnt in rtw_dequeue_xframe Martin Kaiser
2023-01-23 20:53 ` [PATCH 15/23] staging: r8188eu: simplify dequeue_one_xmitframe Martin Kaiser
2023-01-23 20:53 ` [PATCH 16/23] staging: r8188eu: use list_head for xmitframe list Martin Kaiser
2023-01-23 20:53 ` [PATCH 17/23] staging: r8188eu: merge dequeue_one_xmitframe into its caller Martin Kaiser
2023-01-23 20:53 ` [PATCH 18/23] staging: r8188eu: use lists for hwxmits Martin Kaiser
2023-01-23 20:53 ` [PATCH 19/23] staging: r8188eu: fix rtw_xmitframe_enqueue error handling Martin Kaiser
2023-01-23 20:53 ` [PATCH 20/23] staging: r8188eu: remove rtw_xmitframe_enqueue Martin Kaiser
2023-01-23 20:53 ` [PATCH 21/23] staging: r8188eu: struct agg_pkt_info is unused Martin Kaiser
2023-01-23 20:53 ` [PATCH 22/23] staging: r8188eu: apsd_setting " Martin Kaiser
2023-01-23 20:53 ` Martin Kaiser [this message]
2023-01-24 19:01 ` [PATCH 00/23] staging: r8188eu: some more xmit cleanups Philipp Hortmann

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=20230123205342.229589-24-martin@kaiser.cx \
    --to=martin@kaiser.cx \
    --cc=Larry.Finger@lwfinger.net \
    --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®