staging: rtl8187se: Use min_t instead of min
authorAna Rey <anarey@gmail.com>
Mon, 17 Mar 2014 20:22:29 +0000 (21:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Mar 2014 17:16:36 +0000 (10:16 -0700)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c

index 0ac82d328d269e9f050eecc654895b4b1fe7a3a7..07c3f715a6f597ce478a79e0b268fdf5acfa46f8 100644 (file)
@@ -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 */