diff mbox

[OPW,kernel,6/6] staging: rtl8187se: Use min_t instead of min

Message ID dd2210d6131881e6ac75b54dfa6438f72c6b6196.1395087065.git.anarey@gmail.com
State New, archived
Headers show

Commit Message

Ana Rey March 17, 2014, 8:22 p.m. UTC
Use min_t instead of min function in ieee80211/ieee80211_wx.c

Fix sparse warnings:
WARNING: min() should probably be min_t(u8, network->ssid_len, 32)

Signed-off-by: Ana Rey <anarey@gmail.com>
---
 drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
index 0ac82d3..07c3f71 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
@@ -66,7 +66,7 @@  static inline char *rtl818x_translate_scan(struct ieee80211_device *ieee,
 		iwe.u.data.length = sizeof("<hidden>");
 		start = iwe_stream_add_point(info, start, stop, &iwe, "<hidden>");
 	} else {
-		iwe.u.data.length = min(network->ssid_len, (u8)32);
+		iwe.u.data.length = min_t(u8, network->ssid_len, 32);
 		start = iwe_stream_add_point(info, start, stop, &iwe, network->ssid);
 	}
 	/* Add the protocol name */