]> www.infradead.org Git - linux.git/commitdiff
staging: rtl8192e: remove set but otherwise unused local variable iv32
authorSimon Horman <horms@kernel.org>
Wed, 21 Aug 2024 15:42:50 +0000 (16:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Aug 2024 07:47:08 +0000 (15:47 +0800)
Remove iv32 from rtllib_tkip_get_key() as it is set but otherwise
unused.

Flagged by allmodconfig W=1 builds with gcc-13 and clang-18.
Compile tested only.

Signed-off-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240821-rtl8192e-unused-var-v1-1-08b9e869260e@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtllib_crypt_tkip.c

index dc0917b0351174c90364a7035dd1fa31b531ca79..31eff306e8aaaae653b9ab28037ae38570e1ce6f 100644 (file)
@@ -638,10 +638,7 @@ static int rtllib_tkip_get_key(void *key, int len, u8 *seq, void *priv)
        if (seq) {
                /* Return the sequence number of the last transmitted frame. */
                u16 iv16 = tkey->tx_iv16;
-               u32 iv32 = tkey->tx_iv32;
 
-               if (iv16 == 0)
-                       iv32--;
                iv16--;
                seq[0] = tkey->tx_iv16;
                seq[1] = tkey->tx_iv16 >> 8;