diff mbox

[OPW,kernel] staging:rtl8821ae: Fix sparse warnings of cast truncates bits from constant value

Message ID 20140316182500.GA11048@himangi-Inspiron-N5110gmail.com
State New, archived
Headers show

Commit Message

HIMANGI SARAOGI March 16, 2014, 6:25 p.m. UTC
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>
---
 drivers/staging/rtl8821ae/rtl8821ae/phy.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/staging/rtl8821ae/rtl8821ae/phy.c b/drivers/staging/rtl8821ae/rtl8821ae/phy.c
index c661290..1dd3301 100644
--- a/drivers/staging/rtl8821ae/rtl8821ae/phy.c
+++ b/drivers/staging/rtl8821ae/rtl8821ae/phy.c
@@ -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;