staging: rtl8192e: Remove unnecessary u8 cast in comparison
authorSolomon Tan <wjsota@gmail.com>
Sat, 23 Apr 2022 13:01:46 +0000 (21:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Apr 2022 09:35:18 +0000 (11:35 +0200)
Since the macro VERSION_8190_BD is defined to be 0x3, and the structure
members card_8192_version and IC_Cut are both u8, an explicit u8 cast is
unnecessary.

Signed-off-by: Solomon Tan <wjsota@gmail.com>
Link: https://lore.kernel.org/r/20220423130150.161903-4-wjsota@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c

index 4fe806e..b608540 100644 (file)
@@ -811,7 +811,7 @@ start:
 
        rtl92e_config_mac(dev);
 
-       if (priv->card_8192_version > (u8)VERSION_8190_BD) {
+       if (priv->card_8192_version > VERSION_8190_BD) {
                rtl92e_get_tx_power(dev);
                rtl92e_set_tx_power(dev, priv->chan);
        }
index 1b70c12..b7bdbd8 100644 (file)
@@ -919,7 +919,7 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel,
                                continue;
                        switch (CurrentCmd->CmdID) {
                        case CmdID_SetTxPowerLevel:
-                               if (priv->IC_Cut > (u8)VERSION_8190_BD)
+                               if (priv->IC_Cut > VERSION_8190_BD)
                                        _rtl92e_set_tx_power_level(dev,
                                                                   channel);
                                break;