staging: rtl8723bs: simplify condition in rtw_btcoex_MediaStatusNotify
PATCH 1/1 staging: rtl8723bs: simplify condition in rtw_btcoex_MediaStatusNotify
Remove redundant parentheses and unnecessary comparison to true in the conditional expression to improve readability.
No functional change.
Signed-off-by Zile Xiong <[email protected]>
--- drivers/staging/rtl8723bs/core/rtw_btcoex.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtl8723bs/core/rtw_btcoex.c +1 -3
@@ -10,10 +10,8 @@void rtw_btcoex_MediaStatusNotify (struct adapter *padapter,u8 media_status) { -if ((media_status ==RT_MEDIA_CONNECT ) - && (check_fwstate (&padapter->mlmepriv,WIFI_AP_STATE ) == true)) { +if (media_status ==RT_MEDIA_CONNECT &&check_fwstate (&padapter->mlmepriv,WIFI_AP_STATE ))rtw_hal_set_hwreg (padapter,HW_VAR_DL_RSVD_PAGE ,NULL ); - }hal_btcoex_MediaStatusNotify (padapter, media_status); }
Signature · 1 line
2.39.5
Greg KH
maintainerQuoted 15 lines · Zile Xiong
Remove redundant parentheses and unnecessary comparison to true in the conditional expression to improve readability.
No functional change.
Signed-off-by Zile Xiong <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_btcoex.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/staging/rtl8723bs/core/rtw_btcoex.c +0
-0
drivers/staging/rtl8723bs/core/rtw_btcoex.c line 13
Quoted 6 lines
drivers/staging/rtl8723bs/core/rtw_btcoex.c +1
-2@@ -10,10 +10,8 @@void rtw_btcoex_MediaStatusNotify (struct adapter *padapter,u8 media_status) { -if ((media_status ==RT_MEDIA_CONNECT ) - && (check_fwstate (&padapter->mlmepriv,WIFI_AP_STATE ) == true)) { +if (media_status ==RT_MEDIA_CONNECT &&check_fwstate (&padapter->mlmepriv,WIFI_AP_STATE ))
Please no, now you need to remember that == takes precidence over &&.
drivers/staging/rtl8723bs/core/rtw_btcoex.c line 16
Quoted 2 lines
drivers/staging/rtl8723bs/core/rtw_btcoex.c +0
-1rtw_hal_set_hwreg (padapter,HW_VAR_DL_RSVD_PAGE ,NULL ); - }
You also did two different things here in the same change, which isn't alowed for staging patches.
thanks,
greg k-h