aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8188eu
diff options
context:
space:
mode:
authorGulsah Kose <gulsah.1004@gmail.com>2014-10-30 03:03:46 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-30 12:20:16 -0700
commit3fd511d98660cba235dfadf1f296a3246fbaea58 (patch)
tree7e795ebe795990d575a8a56eef34a58e3131582c /drivers/staging/rtl8188eu
parent04947c5be5ca3824586f94352293549b899b2d89 (diff)
staging: rtl8188eu: os_dep: Used min_t instead of min
This patch fixes this checkpatch.pl warning: WARNING: min() should probably be min_t(int, req->essid_len, IW_ESSID_MAX_SIZE) by using this coccinelle script: @r@ identifier i; expression e1, e2; type t1, t2; @@ t1 i = - min((t2)e1, e2); + min_t(t2, e1, e2); Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu')
-rw-r--r--drivers/staging/rtl8188eu/os_dep/ioctl_linux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
index 70b729f26613..08ba7d3e6c69 100644
--- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
@@ -1134,7 +1134,8 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
struct iw_scan_req *req = (struct iw_scan_req *)extra;
if (wrqu->data.flags & IW_SCAN_THIS_ESSID) {
- int len = min((int)req->essid_len, IW_ESSID_MAX_SIZE);
+ int len = min_t(int, req->essid_len,
+ IW_ESSID_MAX_SIZE);
memcpy(ssid[0].Ssid, req->essid, len);
ssid[0].SsidLength = len;

Privacy Policy