[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221106124901.720785-9-martin@kaiser.cx>
Date: Sun, 6 Nov 2022 13:49:00 +0100
From: Martin Kaiser <martin@...ser.cx>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Larry Finger <Larry.Finger@...inger.net>,
Phillip Potter <phil@...lpotter.co.uk>,
Michael Straube <straube.linux@...il.com>,
Pavel Skripkin <paskripkin@...il.com>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
Martin Kaiser <martin@...ser.cx>
Subject: [PATCH 8/9] staging: r8188eu: merge two rtw_free_network_nolock functions
Remove the _rtw_free_network_nolock function and merge it into
rtw_free_network_nolock, which is its only caller.
Signed-off-by: Martin Kaiser <martin@...ser.cx>
---
drivers/staging/r8188eu/core/rtw_mlme.c | 23 ++++++++--------------
drivers/staging/r8188eu/include/rtw_mlme.h | 2 --
2 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
index a47ae33454b3..b272123626ac 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme.c
@@ -76,19 +76,6 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwor
spin_unlock_bh(&free_queue->lock);
}
-void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork)
-{
- struct __queue *free_queue = &pmlmepriv->free_bss_pool;
-
- if (!pnetwork)
- return;
- if (pnetwork->fixed)
- return;
- list_del_init(&pnetwork->list);
- list_add_tail(&pnetwork->list, get_list_head(free_queue));
- pmlmepriv->num_of_scanned--;
-}
-
/*
return the wlan_network with the matching addr
@@ -307,9 +294,15 @@ struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv)
static void rtw_free_network_nolock(struct mlme_priv *pmlmepriv,
struct wlan_network *pnetwork)
{
+ struct __queue *free_queue = &pmlmepriv->free_bss_pool;
- _rtw_free_network_nolock(pmlmepriv, pnetwork);
-
+ if (!pnetwork)
+ return;
+ if (pnetwork->fixed)
+ return;
+ list_del_init(&pnetwork->list);
+ list_add_tail(&pnetwork->list, get_list_head(free_queue));
+ pmlmepriv->num_of_scanned--;
}
void rtw_free_network_queue(struct adapter *dev, u8 isfreeall)
diff --git a/drivers/staging/r8188eu/include/rtw_mlme.h b/drivers/staging/r8188eu/include/rtw_mlme.h
index 268f898b151b..3ff653ff1d81 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme.h
@@ -539,8 +539,6 @@ struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv);
void _rtw_free_network(struct mlme_priv *pmlmepriv,
struct wlan_network *pnetwork, u8 isfreeall);
-void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv,
- struct wlan_network *pnetwork);
struct wlan_network *_rtw_find_network(struct __queue *scanned_queue, u8 *addr);
--
2.30.2
Powered by blists - more mailing lists