staging: rtl8723bs: Remove unnecessary parentheses
v3 cover staging: rtl8723bs: Remove unnecessary parentheses
Challenge suggested by coccinelle
This patchset does following tasks:
-Remove unnecessary parentheses while returning a value by evaluating an expression. -Fix indentation issues by removing spaces and adding tabs.
Changes in v3:
-One new patch added to the series to fix indentation issue. -Patch 8/9 separated to remove unnecessary parentheses only.
Changes in v2:
-Tried to separate two issues in different patches.
Payal Kshirsagar (9):
staging: rtl8723bs: hal: sdio_ops.c: Remove unnecessary parentheses
staging: rtl8723bs: hal: rtl8723b_phycfg.c: Remove unnecessary
parentheses
staging: rtl8723bs: hal: hal_com.c: Remove unnecessary parentheses
staging: rtl8723bs: hal: odm_HWConfig.c: Remove unnecessary
parentheses
staging: rtl8723bs: core: rtw_mlme.c: Remove unnecessary parentheses
staging: rtl8723bs: core: rtw_wlan_util.c: Remove unnecessary
parentheses
staging: rtl8723bs: core: rtw_ieee80211.c: Remove unnecessary
parentheses
staging: rtl8723bs: os_dep: ioctl_linux.c: Remove unnecessary
parentheses
staging: rtl8723bs: Fix indentation issue.
drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 6 +++--- drivers/staging/rtl8723bs/core/rtw_mlme.c | 8 ++++---- drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2 +- drivers/staging/rtl8723bs/hal/hal_com.c | 6 +++--- drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 2 +- drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 2 +- drivers/staging/rtl8723bs/hal/sdio_ops.c | 6 +++--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-)
Signature · 1 line
2.7.4
PATCH v3 1/9 staging: rtl8723bs: hal: sdio_ops.c: Remove unnecessary parentheses
Challenge suggested by coccinelle.
Remove unnecessary parentheses around expressions.
--- drivers/staging/rtl8723bs/hal/sdio_ops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/hal/sdio_ops.c +3 -3
@@ -560,7 +560,7 @@ static s32 _sdio_local_read( n =RND4 (cnt); tmpbuf =rtw_malloc (n);if (!tmpbuf) -return (-1 ); +return -1 ; err =_sd_read (intfhdl, addr, n, tmpbuf);if (!err)
@@ -601,7 +601,7 @@ s32 sdio_local_read( n =RND4 (cnt); tmpbuf =rtw_malloc (n);if (!tmpbuf) -return (-1 ); +return -1 ; err =sd_read (intfhdl, addr, n, tmpbuf);if (!err)
@@ -646,7 +646,7 @@ s32 sdio_local_write( tmpbuf =rtw_malloc (cnt);if (!tmpbuf) -return (-1 ); +return -1 ;memcpy (tmpbuf, buf, cnt);
Signature · 1 line
2.7.4
PATCH v3 2/9 staging: rtl8723bs: hal: rtl8723b_phycfg.c: Remove unnecessary parentheses
In reply to Payal KshirsagarChallenge suggested by coccinelle.
Remove unnecessary parentheses around an expression.
--- drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c +1 -1
@@ -827,7 +827,7 @@ static u8 phy_GetSecondaryChnl_8723B(struct adapter *Adapter) }RT_TRACE (_module_hal_init_c_, _drv_info_, ("SCMapping: SC Value %x\n" , ((SCSettingOf40 <<4 ) | SCSettingOf20))); -return ((SCSettingOf40 <<4 ) | SCSettingOf20); +return (SCSettingOf40 <<4 ) | SCSettingOf20; }static void phy_PostSetBwMode8723B (struct adapter *Adapter)
Signature · 1 line
2.7.4
PATCH v3 3/9 staging: rtl8723bs: hal: hal_com.c: Remove unnecessary parentheses
In reply to Payal KshirsagarChallenge suggested by coccinelle.
Remove unnecessary parentheses around expressions.
--- drivers/staging/rtl8723bs/hal/hal_com.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/hal/hal_com.c +3 -3
@@ -1389,11 +1389,11 @@ bool IsHexDigit(char chTmp)u32 MapCharToHexDigit (char chTmp) {if (chTmp >='0' && chTmp <='9' ) -return (chTmp -'0' ); +return chTmp -'0' ;else if (chTmp >='a' && chTmp <='f' ) -return (10 + (chTmp -'a' )); +return 10 + (chTmp -'a' );else if (chTmp >='A' && chTmp <='F' ) -return (10 + (chTmp -'A' )); +return 10 + (chTmp -'A' );else return 0 ; }
Signature · 1 line
2.7.4
PATCH v3 4/9 staging: rtl8723bs: hal: odm_HWConfig.c: Remove unnecessary parentheses
In reply to Payal KshirsagarChallenge suggested by coccinelle.
Remove unnecessary parentheses around an expression, add spaces around operator and remove trailing space.
--- drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/hal/odm_HWConfig.c +1 -1
@@ -19,7 +19,7 @@ static u8 odm_QueryRxPwrPercentage(s8 AntPower)else if (AntPower >=0 )return 100 ;else -return (100 +AntPower); +return 100 + AntPower; }
Signature · 1 line
2.7.4
PATCH v3 5/9 staging: rtl8723bs: core: rtw_mlme.c: Remove unnecessary parentheses
In reply to Payal KshirsagarChallenge suggested by coccinelle.
Remove unnecessary parentheses around expressions.
--- drivers/staging/rtl8723bs/core/rtw_mlme.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme.c +4 -4
@@ -332,7 +332,7 @@ void rtw_generate_random_ibss(u8 *pibss)u8 *rtw_get_capability_from_ie (u8 *ie) { -return (ie +8 +2 ); +return ie +8 +2 ; }
@@ -347,7 +347,7 @@ u16 rtw_get_capability(struct wlan_bssid_ex *bss)u8 *rtw_get_beacon_interval_from_ie (u8 *ie) { -return (ie +8 ); +return ie +8 ; }
@@ -451,14 +451,14 @@ int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst, u8 fea s_cap =le16_to_cpu (tmps); d_cap =le16_to_cpu (tmpd); -return ((src->Ssid.SsidLength == dst->Ssid.SsidLength) && +return (src->Ssid.SsidLength == dst->Ssid.SsidLength) &&/* (src->Configuration.DSConfig == dst->Configuration.DSConfig) && */ ((!memcmp (src->MacAddress, dst->MacAddress,ETH_ALEN ))) && ((!memcmp (src->Ssid.Ssid, dst->Ssid.Ssid, src->Ssid.SsidLength))) && ((s_cap &WLAN_CAPABILITY_IBSS ) == (d_cap &WLAN_CAPABILITY_IBSS )) && ((s_cap &WLAN_CAPABILITY_BSS ) == - (d_cap &WLAN_CAPABILITY_BSS ))); + (d_cap &WLAN_CAPABILITY_BSS )); }
Signature · 1 line
2.7.4
PATCH v3 6/9 staging: rtl8723bs: core: rtw_wlan_util.c: Remove unnecessary parentheses
In reply to Payal KshirsagarChallenge suggested by coccinelle.
Remove unnecessary parentheses around an expression.
--- drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_wlan_util.c +1 -1
@@ -518,7 +518,7 @@ unsigned int decide_wait_for_beacon_timeout(unsigned int bcn_interval)else if ((bcn_interval <<2 ) >WAIT_FOR_BCN_TO_MAX )return WAIT_FOR_BCN_TO_MAX ;else -return ((bcn_interval <<2 )); +return bcn_interval <<2 ; }void invalidate_cam_all (struct adapter *padapter)
Signature · 1 line
2.7.4
PATCH v3 7/9 staging: rtl8723bs: core: rtw_ieee80211.c: Remove unnecessary parentheses
In reply to Payal KshirsagarChallenge suggested by coccinelle.
Remove unnecessary parentheses around expressions.
--- drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ieee80211.c +3 -3
@@ -114,7 +114,7 @@ u8 *rtw_set_fixed_ie(unsigned char *pbuf, unsigned int len, unsigned char *sourc {memcpy ((void *)pbuf, (void *)source, len); *frlen = *frlen + len; -return (pbuf + len); +return pbuf + len; }/* rtw_set_ie will update frame length */
@@ -136,7 +136,7 @@ u8 *rtw_set_ie *frlen = *frlen + (len +2 ); -return (pbuf + len +2 ); +return pbuf + len +2 ; }/*----------------------------------------------------------------------------
@@ -706,7 +706,7 @@ int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie, } } -return (*rsn_len + *wpa_len); +return *rsn_len + *wpa_len; }u8 rtw_is_wps_ie (u8 *ie_ptr,uint *wps_ielen)
Signature · 1 line
2.7.4
PATCH v3 8/9 staging: rtl8723bs: os_dep: ioctl_linux.c: Remove unnecessary parentheses
In reply to Payal KshirsagarChallenge suggested by coccinelle.
Remove unnecessary parentheses around an expression.
--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +1 -1
@@ -961,7 +961,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,if (pPMK->cmd ==IW_PMKSA_ADD ) {DBG_871X ("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n" );if (!memcmp (strIssueBssid, strZeroMacAddress,ETH_ALEN )) -return (intReturn); +return intReturn;else intReturn = true;
Signature · 1 line
2.7.4
PATCH v3 9/9 staging: rtl8723bs: Fix indentation issue.
In reply to Payal KshirsagarTo fix the indentation issue remove spaces and add tabs.
--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +2 -2
@@ -961,9 +961,9 @@ static int rtw_wx_set_pmkid(struct net_device *dev,if (pPMK->cmd ==IW_PMKSA_ADD ) {DBG_871X ("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n" );if (!memcmp (strIssueBssid, strZeroMacAddress,ETH_ALEN )) -return intReturn; +return intReturn;else - intReturn = true; + intReturn = true; blInserted = false;
Signature · 1 line
2.7.4
Re: [Outreachy kernel] [PATCH v3 9/9] staging: rtl8723bs: Fix indentation issue.
Quoted 13 lines · Payal Kshirsagar
To fix the indentation issue remove spaces and add tabs.
Signed-off-by Payal Kshirsagar <[email protected]>--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +0
-0@@ -961,9 +961,9 @@ static int rtw_wx_set_pmkid(struct net_device *dev,if (pPMK->cmd ==IW_PMKSA_ADD ) {
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c static int rtw_wx_set_pmkid(struct net_device *dev, · line 969
Quoted 10 lines
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +2
-2DBG_871X ("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n" );if (!memcmp (strIssueBssid, strZeroMacAddress,ETH_ALEN )) -return intReturn; +return intReturn;else - intReturn = true; + intReturn = true; blInserted = false;
Please just fix up all of the formatting in this function. The spaces all need to be turned into tabs.
thanks,
greg k-h
Quoted 4 lines · Payal Kshirsagar
Challenge suggested by coccinelle
This patchset does following tasks:
-Remove unnecessary parentheses while returning a value by evaluating an expression. -Fix indentation issues by removing spaces and adding tabs.
None of the patches in this patchset applied at all to my staging-testing branch.
Please rebase your development branch on my latest branch and then resend the updated patches.
thanks,
greg k-h
Quoted 4 lines · Greg KH
Quoted 3 lines · Payal Kshirsagar
Challenge suggested by coccinelle
This patchset does following tasks:
-Remove unnecessary parentheses while returning a value by
Quoted 9 lines
evaluating an expression.
Quoted 1 line
-Fix indentation issues by removing spaces and adding tabs.
None of the patches in this patchset applied at all to my staging-testing branch.
Please rebase your development branch on my latest branch and then resend the updated patches.
Okay I will
Thanks,
Payal
thanks,
Quoted 3 lines
greg k-h
Re: [Outreachy kernel] [PATCH v3 9/9] staging: rtl8723bs: Fix indentation issue.
In reply to Greg KHQuoted 23 lines · Greg KH
Review
Quoted 8 lines · Payal Kshirsagar
To fix the indentation issue remove spaces and add tabs.
Signed-off-by Payal Kshirsagar <[email protected]>--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.cQuoted 13 lines
index 68fac89..ec336a5 100644
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +2
-2@@ -961,9 +961,9 @@ static int rtw_wx_set_pmkid(struct net_device *dev,if (pPMK->cmd ==IW_PMKSA_ADD ) {DBG_871X ("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n" );if (!memcmp (strIssueBssid, strZeroMacAddress,ETH_ALEN )) -return intReturn; +return intReturn;else - intReturn = true; + intReturn = true;
Quoted 6 lines
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c static int rtw_wx_set_pmkid(struct net_device *dev, · line 969
Quoted 2 lines
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +0
-0blInserted = false;Please just fix up all of the formatting in this function. The spaces all need to be turned into tabs.
Okay I will fix it and send it in a new patch.
Thanks,
Payal
thanks,
Quoted 3 lines
greg k-h