net: wireless: realtek: Fix warnings

Building the realtek wireless driver generates various warnings due to
incorrect indentation or missing curly braces. For example, the
following warnings are seen ...

 drivers/net/wireless/realtek/rtl8822ce/core/rtw_mlme.c: In function
 ‘rtw_drv_scan_by_self’:
 drivers/net/wireless/realtek/rtl8822ce/core/rtw_mlme.c:3167:17:
 warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
 3167 |                 else
      |                 ^~~~
 drivers/net/wireless/realtek/rtl8822ce/core/rtw_mlme.c:3170:25:
 note: ...this statement, but the latter is misleadingly indented as if
 it were guarded by the ‘else’
 3170 |                         goto exit;
      |                         ^~~~

 drivers/net/wireless/realtek/rtl8822ce/core/efuse/rtw_efuse.c:917:17:
 warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  917 |                 if (i % 16 == 0)
      |                 ^~

Fix the indentation and add the necessary curly braces to resolve these
warnings.

Bug 4190030

Change-Id: Ic13f1470043190ffd8401581cb97c908070c2940
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934697
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2023-07-11 13:41:15 +01:00
committed by mobile promotions
parent 2cf67077e2
commit fa591a862a
3 changed files with 15 additions and 12 deletions

View File

@@ -916,11 +916,11 @@ void rtw_efuse_analyze(PADAPTER padapter, u8 Type, u8 Fake)
for (i = 0; i < mapLen; i++) {
if (i % 16 == 0)
RTW_PRINT_SEL(RTW_DBGDUMP, "0x%03x: ", i);
_RTW_PRINT_SEL(RTW_DBGDUMP, "%02X%s"
, pEfuseHal->fakeEfuseInitMap[i]
, ((i + 1) % 16 == 0) ? "\n" : (((i + 1) % 8 == 0) ? " " : " ")
);
}
_RTW_PRINT_SEL(RTW_DBGDUMP, "%02X%s"
, pEfuseHal->fakeEfuseInitMap[i]
, ((i + 1) % 16 == 0) ? "\n" : (((i + 1) % 8 == 0) ? " " : " "));
}
_RTW_PRINT_SEL(RTW_DBGDUMP, "\n");
out_free_buffer:

View File

@@ -3162,12 +3162,14 @@ void rtw_drv_scan_by_self(_adapter *padapter, u8 reason)
ssc_chk = rtw_sitesurvey_condition_check(padapter, _FALSE);
if( ssc_chk == SS_DENY_BUSY_TRAFFIC) {
#ifdef CONFIG_LAYER2_ROAMING
if (rtw_chk_roam_flags(padapter, RTW_ROAM_ACTIVE) && pmlmepriv->need_to_roam == _TRUE)
if (rtw_chk_roam_flags(padapter, RTW_ROAM_ACTIVE) && pmlmepriv->need_to_roam == _TRUE) {
RTW_INFO(FUNC_ADPT_FMT" need to roam, don't care BusyTraffic\n", FUNC_ADPT_ARG(padapter));
else
} else
#endif
{
RTW_INFO(FUNC_ADPT_FMT" exit BusyTraffic\n", FUNC_ADPT_ARG(padapter));
goto exit;
}
}
else if (ssc_chk != SS_ALLOW)
goto exit;

View File

@@ -3782,11 +3782,12 @@ int validate_mp_recv_frame(_adapter *adapter, union recv_frame *precv_frame)
for (i = 0; i < precv_frame->u.hdr.len; i = i + 8)
RTW_INFO("%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:\n", *(ptr + i),
*(ptr + i + 1), *(ptr + i + 2) , *(ptr + i + 3) , *(ptr + i + 4), *(ptr + i + 5), *(ptr + i + 6), *(ptr + i + 7));
RTW_INFO("#############################\n");
_rtw_memset(pmppriv->mplink_buf, '\0' , sizeof(pmppriv->mplink_buf));
_rtw_memcpy(pmppriv->mplink_buf, ptr, precv_frame->u.hdr.len);
pmppriv->mplink_rx_len = precv_frame->u.hdr.len;
pmppriv->mplink_brx =_TRUE;
RTW_INFO("#############################\n");
_rtw_memset(pmppriv->mplink_buf, '\0' , sizeof(pmppriv->mplink_buf));
_rtw_memcpy(pmppriv->mplink_buf, ptr, precv_frame->u.hdr.len);
pmppriv->mplink_rx_len = precv_frame->u.hdr.len;
pmppriv->mplink_brx =_TRUE;
}
}
if (pmppriv->bloopback) {