From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Martin Kaiser <martin@kaiser.cx>,
Michael Straube <straube.linux@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Subject: [PATCH 3/3] staging: r8188eu: Remove no more used variable and function
Date: Mon, 16 Aug 2021 18:06:17 +0200 [thread overview]
Message-ID: <20210816160617.11949-4-fmdefrancesco@gmail.com> (raw)
In-Reply-To: <20210816160617.11949-1-fmdefrancesco@gmail.com>
Remove the 'sender' pointer to integer. Remove
__nat25_db_network_lookup_and_replace(). Following the deletion of the
code related to the NAT25_LOOKUP method, they are no more needed.
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
---
drivers/staging/r8188eu/core/rtw_br_ext.c | 52 +----------------------
1 file changed, 1 insertion(+), 51 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_br_ext.c b/drivers/staging/r8188eu/core/rtw_br_ext.c
index 5b032406e9d3..62864fbbdef3 100644
--- a/drivers/staging/r8188eu/core/rtw_br_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_br_ext.c
@@ -326,56 +326,6 @@ static inline void __network_hash_unlink(struct nat25_network_db_entry *ent)
ent->pprev_hash = NULL;
}
-static int __nat25_db_network_lookup_and_replace(struct adapter *priv,
- struct sk_buff *skb, unsigned char *networkAddr)
-{
- struct nat25_network_db_entry *db;
-
- spin_lock_bh(&priv->br_ext_lock);
-
- db = priv->nethash[__nat25_network_hash(networkAddr)];
- while (db) {
- if (!memcmp(db->networkAddr, networkAddr, MAX_NETWORK_ADDR_LEN)) {
- if (!__nat25_has_expired(priv, db)) {
- /* replace the destination mac address */
- memcpy(skb->data, db->macAddr, ETH_ALEN);
- atomic_inc(&db->use_count);
-
- DEBUG_INFO("NAT25: Lookup M:%02x%02x%02x%02x%02x%02x N:%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
- "%02x%02x%02x%02x%02x%02x\n",
- db->macAddr[0],
- db->macAddr[1],
- db->macAddr[2],
- db->macAddr[3],
- db->macAddr[4],
- db->macAddr[5],
- db->networkAddr[0],
- db->networkAddr[1],
- db->networkAddr[2],
- db->networkAddr[3],
- db->networkAddr[4],
- db->networkAddr[5],
- db->networkAddr[6],
- db->networkAddr[7],
- db->networkAddr[8],
- db->networkAddr[9],
- db->networkAddr[10],
- db->networkAddr[11],
- db->networkAddr[12],
- db->networkAddr[13],
- db->networkAddr[14],
- db->networkAddr[15],
- db->networkAddr[16]);
- }
- spin_unlock_bh(&priv->br_ext_lock);
- return 1;
- }
- db = db->next_hash;
- }
- spin_unlock_bh(&priv->br_ext_lock);
- return 0;
-}
-
static void __nat25_db_network_insert(struct adapter *priv,
unsigned char *macAddr, unsigned char *networkAddr)
{
@@ -524,7 +474,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
/*---------------------------------------------------*/
struct arphdr *arp = (struct arphdr *)(skb->data + ETH_HLEN);
unsigned char *arp_ptr = (unsigned char *)(arp + 1);
- unsigned int *sender, *target;
+ unsigned int *sender;
if (arp->ar_pro != __constant_htons(ETH_P_IP)) {
DEBUG_WARN("NAT25: arp protocol unknown (%4x)!\n", be16_to_cpu(arp->ar_pro));
--
2.32.0
next prev parent reply other threads:[~2021-08-16 16:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-16 16:06 [PATCH 0/3] staging: r8188eu: Remove unused code Fabio M. De Francesco
2021-08-16 16:06 ` [PATCH 1/3] staging: r8188eu: Remove unused nat25_handle_frame() Fabio M. De Francesco
2021-08-16 16:06 ` [PATCH 2/3] staging: r8188eu: Remove code depending on NAT25_LOOKUP Fabio M. De Francesco
2021-08-16 16:06 ` Fabio M. De Francesco [this message]
2021-08-16 16:30 ` [PATCH 0/3] staging: r8188eu: Remove unused code Michael Straube
2021-08-16 16:49 ` Greg Kroah-Hartman
2021-08-17 8:50 ` Fabio M. De Francesco
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=20210816160617.11949-4-fmdefrancesco@gmail.com \
--to=fmdefrancesco@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=martin@kaiser.cx \
--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;
as well as URLs for NNTP newsgroup(s).