From: Michael Straube <straube.linux@gmail.com>
To: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Martin Kaiser <martin@kaiser.cx>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] staging: r8188eu: Remove no more used variable and function
Date: Mon, 16 Aug 2021 21:52:44 +0200 [thread overview]
Message-ID: <dd30721c-e83f-745e-38cd-251c06ed25c4@gmail.com> (raw)
In-Reply-To: <20210816180540.29734-1-fmdefrancesco@gmail.com>
On 8/16/21 8:05 PM, Fabio M. De Francesco wrote:
> 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>
> ---
>
> v2: Rebased against latest version of Greg K-H's tree.
>
> 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 0402f48319c4..ee52f28a1e56 100644
> --- a/drivers/staging/r8188eu/core/rtw_br_ext.c
> +++ b/drivers/staging/r8188eu/core/rtw_br_ext.c
> @@ -295,56 +295,6 @@ static 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)
> {
> @@ -493,7 +443,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));
>
Acked-by: Michael Straube <straube.linux@gmail.com>
prev parent reply other threads:[~2021-08-16 19:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-16 18:05 [PATCH v2 3/3] staging: r8188eu: Remove no more used variable and function Fabio M. De Francesco
2021-08-16 19:52 ` Michael Straube [this message]
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=dd30721c-e83f-745e-38cd-251c06ed25c4@gmail.com \
--to=straube.linux@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=fmdefrancesco@gmail.com \
--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 \
/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).