From 05031914cb8f5b8fd3bf7d871aa87cb0a3780f5e Mon Sep 17 00:00:00 2001 From: Tom Gardi Date: Sat, 12 Aug 2017 02:13:02 +0200 Subject: [PATCH] staging/rtl8723bs: Fix some coding style issues in rtw_odm.c. WARNING: line over 80 characters WARNING: static const char * array should probably be static const char * const CHECK: Unnecessary parentheses around hal_data->odmpriv Signed-off-by: Tom Gardi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723bs/core/rtw_odm.c | 38 +++++++++++++----------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_odm.c b/drivers/staging/rtl8723bs/core/rtw_odm.c index 3144e8ec2fa2..edbcaeb9f8c2 100644 --- a/drivers/staging/rtl8723bs/core/rtw_odm.c +++ b/drivers/staging/rtl8723bs/core/rtw_odm.c @@ -18,7 +18,7 @@ #include #include -static const char *odm_comp_str[] = { +static const char * const odm_comp_str[] = { /* BIT0 */"ODM_COMP_DIG", /* BIT1 */"ODM_COMP_RA_MASK", /* BIT2 */"ODM_COMP_DYNAMIC_TXPWR", @@ -55,7 +55,7 @@ static const char *odm_comp_str[] = { #define RTW_ODM_COMP_MAX 32 -static const char *odm_ability_str[] = { +static const char * const odm_ability_str[] = { /* BIT0 */"ODM_BB_DIG", /* BIT1 */"ODM_BB_RA_MASK", /* BIT2 */"ODM_BB_DYNAMIC_TXPWR", @@ -87,7 +87,7 @@ static const char *odm_ability_str[] = { #define RTW_ODM_ABILITY_MAX 27 -static const char *odm_dbg_level_str[] = { +static const char * const odm_dbg_level_str[] = { NULL, "ODM_DBG_OFF", "ODM_DBG_SERIOUS", @@ -127,7 +127,8 @@ void rtw_odm_dbg_level_msg(void *sel, struct adapter *adapter) DBG_871X_SEL_NL(sel, "odm.DebugLevel = %u\n", dbg_level); for (i = 0; i < RTW_ODM_DBG_LEVEL_NUM; i++) { if (odm_dbg_level_str[i]) - DBG_871X_SEL_NL(sel, "%u %s\n", i, odm_dbg_level_str[i]); + DBG_871X_SEL_NL(sel, "%u %s\n", + i, odm_dbg_level_str[i]); } } @@ -161,20 +162,23 @@ void rtw_odm_adaptivity_parm_msg(void *sel, struct adapter *adapter) struct hal_com_data *pHalData = GET_HAL_DATA(adapter); DM_ODM_T *odm = &pHalData->odmpriv; - DBG_871X_SEL_NL(sel, "%10s %16s %8s %10s %11s %14s\n" - , "TH_L2H_ini", "TH_EDCCA_HL_diff", "IGI_Base", "ForceEDCCA", "AdapEn_RSSI", "IGI_LowerBound"); - DBG_871X_SEL_NL(sel, "0x%-8x %-16d 0x%-6x %-10d %-11u %-14u\n" - , (u8)odm->TH_L2H_ini - , odm->TH_EDCCA_HL_diff - , odm->IGI_Base - , odm->ForceEDCCA - , odm->AdapEn_RSSI - , odm->IGI_LowerBound + DBG_871X_SEL_NL(sel, "%10s %16s %8s %10s %11s %14s\n", + "TH_L2H_ini", "TH_EDCCA_HL_diff", "IGI_Base", + "ForceEDCCA", "AdapEn_RSSI", "IGI_LowerBound"); + DBG_871X_SEL_NL(sel, "0x%-8x %-16d 0x%-6x %-10d %-11u %-14u\n", + (u8)odm->TH_L2H_ini, + odm->TH_EDCCA_HL_diff, + odm->IGI_Base, + odm->ForceEDCCA, + odm->AdapEn_RSSI, + odm->IGI_LowerBound ); } -void rtw_odm_adaptivity_parm_set(struct adapter *adapter, s8 TH_L2H_ini, s8 TH_EDCCA_HL_diff, - s8 IGI_Base, bool ForceEDCCA, u8 AdapEn_RSSI, u8 IGI_LowerBound) +void rtw_odm_adaptivity_parm_set(struct adapter *adapter, s8 TH_L2H_ini, + s8 TH_EDCCA_HL_diff, s8 IGI_Base, + bool ForceEDCCA, u8 AdapEn_RSSI, + u8 IGI_LowerBound) { struct hal_com_data *pHalData = GET_HAL_DATA(adapter); DM_ODM_T *odm = &pHalData->odmpriv; @@ -190,8 +194,8 @@ void rtw_odm_adaptivity_parm_set(struct adapter *adapter, s8 TH_L2H_ini, s8 TH_E void rtw_odm_get_perpkt_rssi(void *sel, struct adapter *adapter) { struct hal_com_data *hal_data = GET_HAL_DATA(adapter); - DM_ODM_T *odm = &(hal_data->odmpriv); + DM_ODM_T *odm = &hal_data->odmpriv; DBG_871X_SEL_NL(sel, "RxRate = %s, RSSI_A = %d(%%), RSSI_B = %d(%%)\n", - HDATA_RATE(odm->RxRate), odm->RSSI_A, odm->RSSI_B); + HDATA_RATE(odm->RxRate), odm->RSSI_A, odm->RSSI_B); } -- 2.20.1