From 976a06cc89e817e94b0d87cf55bb46134c494060 Mon Sep 17 00:00:00 2001 From: Mateusz Kulikowski Date: Tue, 28 Jul 2015 23:31:45 +0200 Subject: [PATCH] staging: rtl8192e: Fix IW_IOCTL macro Macro caused checkpatch complaints - replace [] braces with () and use [] braces as array initializers. Signed-off-by: Mateusz Kulikowski Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 68 +++++++++++----------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c index 183d1b2e64f1..7e3ca7ef997b 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c @@ -1115,41 +1115,41 @@ static int r8192_wx_get_PromiscuousMode(struct net_device *dev, } -#define IW_IOCTL(x) [(x)-SIOCSIWCOMMIT] +#define IW_IOCTL(x) ((x) - SIOCSIWCOMMIT) static iw_handler r8192_wx_handlers[] = { - IW_IOCTL(SIOCGIWNAME) = r8192_wx_get_name, - IW_IOCTL(SIOCSIWFREQ) = r8192_wx_set_freq, - IW_IOCTL(SIOCGIWFREQ) = r8192_wx_get_freq, - IW_IOCTL(SIOCSIWMODE) = r8192_wx_set_mode, - IW_IOCTL(SIOCGIWMODE) = r8192_wx_get_mode, - IW_IOCTL(SIOCSIWSENS) = r8192_wx_set_sens, - IW_IOCTL(SIOCGIWSENS) = r8192_wx_get_sens, - IW_IOCTL(SIOCGIWRANGE) = rtl8192_wx_get_range, - IW_IOCTL(SIOCSIWAP) = r8192_wx_set_wap, - IW_IOCTL(SIOCGIWAP) = r8192_wx_get_wap, - IW_IOCTL(SIOCSIWSCAN) = r8192_wx_set_scan, - IW_IOCTL(SIOCGIWSCAN) = r8192_wx_get_scan, - IW_IOCTL(SIOCSIWESSID) = r8192_wx_set_essid, - IW_IOCTL(SIOCGIWESSID) = r8192_wx_get_essid, - IW_IOCTL(SIOCSIWNICKN) = r8192_wx_set_nick, - IW_IOCTL(SIOCGIWNICKN) = r8192_wx_get_nick, - IW_IOCTL(SIOCSIWRATE) = r8192_wx_set_rate, - IW_IOCTL(SIOCGIWRATE) = r8192_wx_get_rate, - IW_IOCTL(SIOCSIWRTS) = r8192_wx_set_rts, - IW_IOCTL(SIOCGIWRTS) = r8192_wx_get_rts, - IW_IOCTL(SIOCSIWFRAG) = r8192_wx_set_frag, - IW_IOCTL(SIOCGIWFRAG) = r8192_wx_get_frag, - IW_IOCTL(SIOCSIWRETRY) = r8192_wx_set_retry, - IW_IOCTL(SIOCGIWRETRY) = r8192_wx_get_retry, - IW_IOCTL(SIOCSIWENCODE) = r8192_wx_set_enc, - IW_IOCTL(SIOCGIWENCODE) = r8192_wx_get_enc, - IW_IOCTL(SIOCSIWPOWER) = r8192_wx_set_power, - IW_IOCTL(SIOCGIWPOWER) = r8192_wx_get_power, - IW_IOCTL(SIOCSIWGENIE) = r8192_wx_set_gen_ie, - IW_IOCTL(SIOCGIWGENIE) = r8192_wx_get_gen_ie, - IW_IOCTL(SIOCSIWMLME) = r8192_wx_set_mlme, - IW_IOCTL(SIOCSIWAUTH) = r8192_wx_set_auth, - IW_IOCTL(SIOCSIWENCODEEXT) = r8192_wx_set_enc_ext, + [IW_IOCTL(SIOCGIWNAME)] = r8192_wx_get_name, + [IW_IOCTL(SIOCSIWFREQ)] = r8192_wx_set_freq, + [IW_IOCTL(SIOCGIWFREQ)] = r8192_wx_get_freq, + [IW_IOCTL(SIOCSIWMODE)] = r8192_wx_set_mode, + [IW_IOCTL(SIOCGIWMODE)] = r8192_wx_get_mode, + [IW_IOCTL(SIOCSIWSENS)] = r8192_wx_set_sens, + [IW_IOCTL(SIOCGIWSENS)] = r8192_wx_get_sens, + [IW_IOCTL(SIOCGIWRANGE)] = rtl8192_wx_get_range, + [IW_IOCTL(SIOCSIWAP)] = r8192_wx_set_wap, + [IW_IOCTL(SIOCGIWAP)] = r8192_wx_get_wap, + [IW_IOCTL(SIOCSIWSCAN)] = r8192_wx_set_scan, + [IW_IOCTL(SIOCGIWSCAN)] = r8192_wx_get_scan, + [IW_IOCTL(SIOCSIWESSID)] = r8192_wx_set_essid, + [IW_IOCTL(SIOCGIWESSID)] = r8192_wx_get_essid, + [IW_IOCTL(SIOCSIWNICKN)] = r8192_wx_set_nick, + [IW_IOCTL(SIOCGIWNICKN)] = r8192_wx_get_nick, + [IW_IOCTL(SIOCSIWRATE)] = r8192_wx_set_rate, + [IW_IOCTL(SIOCGIWRATE)] = r8192_wx_get_rate, + [IW_IOCTL(SIOCSIWRTS)] = r8192_wx_set_rts, + [IW_IOCTL(SIOCGIWRTS)] = r8192_wx_get_rts, + [IW_IOCTL(SIOCSIWFRAG)] = r8192_wx_set_frag, + [IW_IOCTL(SIOCGIWFRAG)] = r8192_wx_get_frag, + [IW_IOCTL(SIOCSIWRETRY)] = r8192_wx_set_retry, + [IW_IOCTL(SIOCGIWRETRY)] = r8192_wx_get_retry, + [IW_IOCTL(SIOCSIWENCODE)] = r8192_wx_set_enc, + [IW_IOCTL(SIOCGIWENCODE)] = r8192_wx_get_enc, + [IW_IOCTL(SIOCSIWPOWER)] = r8192_wx_set_power, + [IW_IOCTL(SIOCGIWPOWER)] = r8192_wx_get_power, + [IW_IOCTL(SIOCSIWGENIE)] = r8192_wx_set_gen_ie, + [IW_IOCTL(SIOCGIWGENIE)] = r8192_wx_get_gen_ie, + [IW_IOCTL(SIOCSIWMLME)] = r8192_wx_set_mlme, + [IW_IOCTL(SIOCSIWAUTH)] = r8192_wx_set_auth, + [IW_IOCTL(SIOCSIWENCODEEXT)] = r8192_wx_set_enc_ext, }; /* the following rule need to be following, -- 2.20.1