Staging: rtl8192e: Replace min macro with min_t
authorSilvan Jegen <s.jegen@gmail.com>
Tue, 25 Feb 2014 17:07:10 +0000 (18:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Feb 2014 20:16:50 +0000 (12:16 -0800)
Instead of an explicit cast the min_t macro should be used.

Signed-off-by: Silvan Jegen <s.jegen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c

index 6202358c2984fc0c5e1597783790df60b97835bd..498995d833e7287013fb9a8a13c49376248ab4b8 100644 (file)
@@ -609,7 +609,7 @@ static int r8192_wx_set_nick(struct net_device *dev,
        if (wrqu->data.length > IW_ESSID_MAX_SIZE)
                return -E2BIG;
        down(&priv->wx_sem);
-       wrqu->data.length = min((size_t) wrqu->data.length, sizeof(priv->nick));
+       wrqu->data.length = min_t(size_t, wrqu->data.length, sizeof(priv->nick));
        memset(priv->nick, 0, sizeof(priv->nick));
        memcpy(priv->nick, extra, wrqu->data.length);
        up(&priv->wx_sem);