[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <dd30721c-e83f-745e-38cd-251c06ed25c4@gmail.com>
Date: Mon, 16 Aug 2021 21:52:44 +0200
From: Michael Straube <straube.linux@...il.com>
To: "Fabio M. De Francesco" <fmdefrancesco@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Larry Finger <Larry.Finger@...inger.net>,
Phillip Potter <phil@...lpotter.co.uk>,
Martin Kaiser <martin@...ser.cx>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/3] staging: r8188eu: Remove no more used variable and
function
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@...il.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@...il.com>
Powered by blists - more mailing lists