staging: r8188eu: core: remove the function __nat25_timeout
authorSaurav Girepunje <saurav.girepunje@gmail.com>
Thu, 4 Nov 2021 02:46:35 +0000 (08:16 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Nov 2021 09:02:02 +0000 (10:02 +0100)
Remove the function __nat25_timeout from rtw_br_ext.c file. This function
can be replace by single statement jiffies - NAT25_AGEING_TIME*HZ.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Link: https://lore.kernel.org/r/YYNJPCQ5hX8BTzwy@Sauravs-MacBook-Air.local
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_br_ext.c

index bcd0f9d..4951f83 100644 (file)
@@ -105,19 +105,10 @@ static int skb_pull_and_merge(struct sk_buff *skb, unsigned char *src, int len)
        return 0;
 }
 
-static unsigned long __nat25_timeout(struct adapter *priv)
-{
-       unsigned long timeout;
-
-       timeout = jiffies - NAT25_AGEING_TIME*HZ;
-
-       return timeout;
-}
-
 static int  __nat25_has_expired(struct adapter *priv,
                                struct nat25_network_db_entry *fdb)
 {
-       if (time_before_eq(fdb->ageing_timer, __nat25_timeout(priv)))
+       if (time_before_eq(fdb->ageing_timer, jiffies - NAT25_AGEING_TIME * HZ))
                return 1;
 
        return 0;