staging:rtl8821ae: Fix sparse warnings of cast truncates bits from constant value
authorHimangi Saraogi <himangi774@gmail.com>
Sun, 16 Mar 2014 18:25:00 +0000 (23:55 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Mar 2014 18:22:16 +0000 (11:22 -0700)
This patch fixes the following sparse warnings:
drivers/staging/rtl8821ae/rtl8821ae/phy.c:444:39: warning: cast truncates bits from constant value (ffffff01 becomes 1)
drivers/staging/rtl8821ae/rtl8821ae/phy.c:445:39: warning: cast truncates bits from constant value (ffffff01 becomes 1)

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8821ae/rtl8821ae/phy.c

index c66129087a6716a4974daf2ab84245f11d7e5223..1dd33016b4b9ad76e0cc69e5d0ce37eec380f7d8 100644 (file)
@@ -441,8 +441,8 @@ u32 phy_get_tx_bb_swing_8812A(
        struct rtl_dm *rtldm = rtl_dm(rtlpriv);
        struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
 
-       char bb_swing_2g = (char) (-1 * 0xFF);
-       char bb_swing_5g = (char) (-1 * 0xFF);
+       char bb_swing_2g = (char) ((-1 * 0xFF) & 0xFF);
+       char bb_swing_5g = (char) ((-1 * 0xFF) & 0xFF);
        u32  out = 0x200;
        const char auto_temp = -1;