From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 12/14] staging: rtl8192e: Remove unused function dot11d_init()
Date: Sun, 19 Nov 2023 23:15:47 +0100 [thread overview]
Message-ID: <d2e8d81ec9eefc7b7eeb9f6fd6a28b28db6b40f0.1700431464.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1700431464.git.philipp.g.hortmann@gmail.com>
The variable dot11d_info->channel_map is initialized in dot11d_init() and
in dot11d_channel_map(). dot11d_init() is called only once just before
dot11d_channel_map(). Therefore dot11d_init() can be removed.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/dot11d.c | 8 --------
drivers/staging/rtl8192e/dot11d.h | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 -
3 files changed, 10 deletions(-)
diff --git a/drivers/staging/rtl8192e/dot11d.c b/drivers/staging/rtl8192e/dot11d.c
index fd488e2fa815..9ec112e00e38 100644
--- a/drivers/staging/rtl8192e/dot11d.c
+++ b/drivers/staging/rtl8192e/dot11d.c
@@ -14,14 +14,6 @@ struct channel_list {
static struct channel_list channel_array = {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13};
-void dot11d_init(struct rtllib_device *ieee)
-{
- struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(ieee);
-
- memset(dot11d_info->channel_map, 0, MAX_CHANNEL_NUMBER + 1);
-}
-EXPORT_SYMBOL(dot11d_init);
-
void dot11d_channel_map(struct rtllib_device *ieee)
{
int i;
diff --git a/drivers/staging/rtl8192e/dot11d.h b/drivers/staging/rtl8192e/dot11d.h
index 82748b12bd82..767bbbc8b01d 100644
--- a/drivers/staging/rtl8192e/dot11d.h
+++ b/drivers/staging/rtl8192e/dot11d.h
@@ -31,7 +31,6 @@ struct rt_dot11d_info {
#define GET_DOT11D_INFO(__ieee_dev) \
((struct rt_dot11d_info *)((__ieee_dev)->dot11d_info))
-void dot11d_init(struct rtllib_device *dev);
void dot11d_channel_map(struct rtllib_device *ieee);
#endif
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 4b842a1789c2..c3466291e221 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -795,7 +795,6 @@ static short _rtl92e_get_channel_map(struct net_device *dev)
struct r8192_priv *priv = rtllib_priv(dev);
- dot11d_init(priv->rtllib);
dot11d_channel_map(priv->rtllib);
for (i = 1; i <= 11; i++)
(priv->rtllib->active_channel_map)[i] = 1;
--
2.42.0
next prev parent reply other threads:[~2023-11-19 22:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-19 22:14 [PATCH 00/14] staging: rtl8192e: IS_DOT11D_ENABLE() returns always false Philipp Hortmann
2023-11-19 22:14 ` [PATCH 01/14] staging: rtl8192e: Remove unexecuted rtllib_extract_country_ie() Philipp Hortmann
2023-11-19 22:14 ` [PATCH 02/14] staging: rtl8192e: Remove unused function dot11d_update_country() Philipp Hortmann
2023-11-19 22:14 ` [PATCH 03/14] staging: rtl8192e: Remove IS_DOT11D_ENABLE(ieee) Philipp Hortmann
2023-11-19 22:14 ` [PATCH 04/14] staging: rtl8192e: Remove unused function dot11d_scan_complete() Philipp Hortmann
2023-11-19 22:15 ` [PATCH 05/14] staging: rtl8192e: Remove unused function dot11d_reset() Philipp Hortmann
2023-11-19 22:15 ` [PATCH 06/14] staging: rtl8192e: Remove unused macros IS_EQUAL_CIE_SRC and friends Philipp Hortmann
2023-11-19 22:15 ` [PATCH 07/14] staging: rtl8192e: Remove unused function copy_mac_addr() Philipp Hortmann
2023-11-19 22:15 ` [PATCH 08/14] staging: rtl8192e: Remove unused variable dot11d_info->state Philipp Hortmann
2023-11-19 22:15 ` [PATCH 09/14] staging: rtl8192e: Remove unused variables from struct rt_dot11d_info Philipp Hortmann
2023-11-19 22:15 ` [PATCH 10/14] staging: rtl8192e: Remove unused variable country_watchdog Philipp Hortmann
2023-11-19 22:15 ` [PATCH 11/14] staging: rtl8192e: Remove unused variable global_domain Philipp Hortmann
2023-11-19 22:15 ` Philipp Hortmann [this message]
2023-11-19 22:15 ` [PATCH 13/14] staging: rtl8192e: Remove unused struct chnl_txpow_triple Philipp Hortmann
2023-11-19 22:16 ` [PATCH 14/14] staging: rtl8192e: Remove unused variable bss_start_channel Philipp Hortmann
2023-11-21 7:31 ` [PATCH 00/14] staging: rtl8192e: IS_DOT11D_ENABLE() returns always false Dan Carpenter
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=d2e8d81ec9eefc7b7eeb9f6fd6a28b28db6b40f0.1700431464.git.philipp.g.hortmann@gmail.com \
--to=philipp.g.hortmann@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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®