From: Silvan Jegen Date: Tue, 25 Feb 2014 17:07:10 +0000 (+0100) Subject: Staging: rtl8192e: Replace min macro with min_t X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ffb8cc92a7c7e0a60943d116bcd13dc306526e35;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git Staging: rtl8192e: Replace min macro with min_t Instead of an explicit cast the min_t macro should be used. Signed-off-by: Silvan Jegen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c index 6202358c2984..498995d833e7 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c @@ -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);