[PATCH] staging: rtl8192e: fix wrong assignment

Gujulan Elango, Hari Prasath (H.) hgujulan at visteon.com
Thu Apr 30 12:06:28 UTC 2015


This patch addresses a spatch warning on assigning a negative
value to a unsigned integer.Similar patch has been submitted by
Larry Finger earlier to silence the same spatch warning in another
file. The logic is the negative number to an unsigned quantity is
fixed by adding 256 to -98 to get the equivalent negative number as
per Larry Finger.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan at visteon.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 352d381..41d2f3f 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -2310,7 +2310,7 @@ static void rtl8192_rx_normal(struct net_device *dev)
 
 	struct rtllib_rx_stats stats = {
 		.signal = 0,
-		.noise = -98,
+		.noise = 158, /*-98 -dBm*/
 		.rate = 0,
 		.freq = RTLLIB_24GHZ_BAND,
 	};
-- 
1.9.1


More information about the devel mailing list