2012-12-07 10:58:29

by Johannes Berg

[permalink] [raw]
Subject: [PATCH] wext: explicitly cast -110 to u8

From: Johannes Berg <[email protected]>

This doesn't generate any different code, but will
suppress a spurious smatch warning.

Signed-off-by: Johannes Berg <[email protected]>
---
net/wireless/wext-compat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
index f9680c9..d997d0f 100644
--- a/net/wireless/wext-compat.c
+++ b/net/wireless/wext-compat.c
@@ -176,7 +176,7 @@ int cfg80211_wext_giwrange(struct net_device *dev,
case CFG80211_SIGNAL_TYPE_NONE:
break;
case CFG80211_SIGNAL_TYPE_MBM:
- range->max_qual.level = -110;
+ range->max_qual.level = (u8)-110;
range->max_qual.qual = 70;
range->avg_qual.qual = 35;
range->max_qual.updated |= IW_QUAL_DBM;
--
1.8.0