From 27368d0b9caa0e9d7ab964582b8f29da88fa1a0f Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Mon, 16 Oct 2017 16:27:15 -0500 Subject: [PATCH] rtl8723ds: Fix some checkpatch warnings and change default log level The default debug level is reduced from 4 to 2. Signed-off-by: Larry Finger --- Makefile | 4 ++-- core/rtw_cmd.c | 34 ++++++++++++++++---------------- hal/phydm/phydm_acs.c | 2 +- hal/phydm/phydm_adaptivity.c | 4 ++-- hal/phydm/phydm_cfotracking.c | 8 ++++---- hal/phydm/phydm_dynamictxpower.c | 2 +- hal/phydm/phydm_noisemonitor.c | 4 ++-- include/ieee80211.h | 2 +- include/rtw_cmd.h | 2 +- include/rtw_mlme_ext.h | 2 +- include/sta_info.h | 4 ++-- os_dep/linux/os_intfs.c | 4 ++-- 12 files changed, 36 insertions(+), 36 deletions(-) diff --git a/Makefile b/Makefile index e6b1f4f..a6d51a9 100644 --- a/Makefile +++ b/Makefile @@ -74,9 +74,9 @@ CONFIG_RTW_NAPI = y CONFIG_RTW_GRO = y ########################## Debug ########################### CONFIG_RTW_DEBUG = y -# default log level is _DRV_INFO_ = 4, +# default log level is _DRV_INFO_ = 2, # please refer to "How_to_set_driver_debug_log_level.doc" to set the available level. -CONFIG_RTW_LOG_LEVEL = 4 +CONFIG_RTW_LOG_LEVEL = 2 ######################## Wake On Lan ########################## CONFIG_WOWLAN = n CONFIG_GPIO_WAKEUP = n diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index 0809c24..ca78a0f 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -2141,7 +2141,7 @@ exit: return res; } -u8 _rtw_set_chplan_cmd(_adapter *adapter, int flags, u8 chplan, const struct country_chplan *country_ent, u8 swconfig) +static u8 _rtw_set_chplan_cmd(_adapter *adapter, int flags, u8 chplan, const struct country_chplan *country_ent, u8 swconfig) { struct cmd_obj *cmdobj; struct SetChannelPlan_param *parm; @@ -2675,7 +2675,7 @@ void rtw_iface_dynamic_chk_wk_hdl(_adapter *padapter) #endif } -void rtw_dynamic_chk_wk_hdl(_adapter *padapter) +static void rtw_dynamic_chk_wk_hdl(_adapter *padapter) { rtw_mi_dynamic_chk_wk_hdl(padapter); @@ -2835,7 +2835,7 @@ exit: } -void rtw_dm_in_lps_hdl(_adapter *padapter) +static void rtw_dm_in_lps_hdl(_adapter *padapter) { rtw_hal_set_hwreg(padapter, HW_VAR_DM_IN_LPS, NULL); } @@ -2876,7 +2876,7 @@ exit: } -void rtw_lps_change_dtim_hdl(_adapter *padapter, u8 dtim) +static void rtw_lps_change_dtim_hdl(_adapter *padapter, u8 dtim) { struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); @@ -3055,7 +3055,7 @@ exit: } #endif -void rtw_dm_ra_mask_hdl(_adapter *padapter, struct sta_info *psta) +static void rtw_dm_ra_mask_hdl(_adapter *padapter, struct sta_info *psta) { if (psta) set_sta_rate(padapter, psta); @@ -3097,18 +3097,18 @@ exit: } -void power_saving_wk_hdl(_adapter *padapter) +static void power_saving_wk_hdl(_adapter *padapter) { rtw_ps_processor(padapter); } /* add for CONFIG_IEEE80211W, none 11w can use it */ -void reset_securitypriv_hdl(_adapter *padapter) +static void reset_securitypriv_hdl(_adapter *padapter) { rtw_reset_securitypriv(padapter); } -void free_assoc_resources_hdl(_adapter *padapter) +static void free_assoc_resources_hdl(_adapter *padapter) { rtw_free_assoc_resources(padapter, 1); } @@ -3679,7 +3679,7 @@ struct btinfo { u8 rsvd_7; }; -void btinfo_evt_dump(void *sel, void *buf) +static void btinfo_evt_dump(void *sel, void *buf) { struct btinfo *info = (struct btinfo *)buf; @@ -3928,7 +3928,7 @@ inline u8 rtw_customer_str_write_cmd(_adapter *adapter, const u8 *cstr) } #endif /* CONFIG_RTW_CUSTOMER_STR */ -u8 rtw_c2h_wk_cmd(PADAPTER padapter, u8 *pbuf, u16 length, u8 type) +static u8 rtw_c2h_wk_cmd(PADAPTER padapter, u8 *pbuf, u16 length, u8 type) { struct cmd_obj *ph2c; struct drvextra_cmd_parm *pdrvextra_cmd_parm; @@ -4046,7 +4046,7 @@ exit: } #endif /* CONFIG_FW_C2H_REG */ -u8 session_tracker_cmd(_adapter *adapter, u8 cmd, struct sta_info *sta, u8 *local_naddr, u8 *local_port, u8 *remote_naddr, u8 *remote_port) +static u8 session_tracker_cmd(_adapter *adapter, u8 cmd, struct sta_info *sta, u8 *local_naddr, u8 *local_port, u8 *remote_naddr, u8 *remote_port) { struct cmd_priv *cmdpriv = &adapter->cmdpriv; struct cmd_obj *cmdobj; @@ -4112,7 +4112,7 @@ inline u8 session_tracker_del_cmd(_adapter *adapter, struct sta_info *sta, u8 *l return session_tracker_cmd(adapter, ST_CMD_DEL, sta, local_naddr, local_port, remote_naddr, remote_port); } -void session_tracker_chk_for_sta(_adapter *adapter, struct sta_info *sta) +static void session_tracker_chk_for_sta(_adapter *adapter, struct sta_info *sta) { struct st_ctl_t *st_ctl = &sta->st_ctl; int i; @@ -4166,11 +4166,11 @@ void session_tracker_chk_for_sta(_adapter *adapter, struct sta_info *sta) RTW_INFO(FUNC_ADPT_FMT" local:%u, remote:%u, rtsp:%u, %u, %u\n", FUNC_ADPT_ARG(adapter) , ntohs(st->local_port), ntohs(st->remote_port), adapter->wfd_info.rtsp_ctrlport, adapter->wfd_info.tdls_rtsp_ctrlport , adapter->wfd_info.peer_rtsp_ctrlport); - if (ntohs(st->local_port) == adapter->wfd_info.rtsp_ctrlport) + if (ntohs((__be16)st->local_port) == adapter->wfd_info.rtsp_ctrlport) op_wfd_mode |= MIRACAST_SINK; - if (ntohs(st->local_port) == adapter->wfd_info.tdls_rtsp_ctrlport) + if (ntohs((__be16)st->local_port) == adapter->wfd_info.tdls_rtsp_ctrlport) op_wfd_mode |= MIRACAST_SINK; - if (ntohs(st->remote_port) == adapter->wfd_info.peer_rtsp_ctrlport) + if (ntohs((__be16)st->remote_port) == adapter->wfd_info.peer_rtsp_ctrlport) op_wfd_mode |= MIRACAST_SOURCE; #endif } @@ -4194,7 +4194,7 @@ exit: return; } -void session_tracker_chk_for_adapter(_adapter *adapter) +static void session_tracker_chk_for_adapter(_adapter *adapter) { struct sta_priv *stapriv = &adapter->stapriv; struct sta_info *sta; @@ -4226,7 +4226,7 @@ void session_tracker_chk_for_adapter(_adapter *adapter) #endif } -void session_tracker_cmd_hdl(_adapter *adapter, struct st_cmd_parm *parm) +static void session_tracker_cmd_hdl(_adapter *adapter, struct st_cmd_parm *parm) { u8 cmd = parm->cmd; struct sta_info *sta = parm->sta; diff --git a/hal/phydm/phydm_acs.c b/hal/phydm/phydm_acs.c index 5227a3a..92b4511 100644 --- a/hal/phydm/phydm_acs.c +++ b/hal/phydm/phydm_acs.c @@ -51,7 +51,7 @@ ODM_GetAutoChannelSelectResult( } -VOID +static VOID odm_AutoChannelSelectSetting( IN PVOID pDM_VOID, IN BOOLEAN IsEnable diff --git a/hal/phydm/phydm_adaptivity.c b/hal/phydm/phydm_adaptivity.c index c226f85..ede4e02 100644 --- a/hal/phydm/phydm_adaptivity.c +++ b/hal/phydm/phydm_adaptivity.c @@ -240,7 +240,7 @@ Phydm_SetEDCCAThreshold( } -VOID +static VOID Phydm_SetLNA( IN PVOID pDM_VOID, IN PhyDM_set_LNA type @@ -570,7 +570,7 @@ Phydm_SearchPwdBLowerBound( Phydm_SetEDCCAThreshold(pDM_Odm, 0x7f, 0x7f); /*resume to no link state*/ } -BOOLEAN +static BOOLEAN phydm_reSearchCondition( IN PVOID pDM_VOID ) diff --git a/hal/phydm/phydm_cfotracking.c b/hal/phydm/phydm_cfotracking.c index a531796..2ab939c 100644 --- a/hal/phydm/phydm_cfotracking.c +++ b/hal/phydm/phydm_cfotracking.c @@ -20,7 +20,7 @@ #include "mp_precomp.h" #include "phydm_precomp.h" -VOID +static VOID odm_SetCrystalCap( IN PVOID pDM_VOID, IN u1Byte CrystalCap @@ -65,7 +65,7 @@ odm_SetCrystalCap( #endif } -u1Byte +static u1Byte odm_GetDefaultCrytaltalCap( IN PVOID pDM_VOID ) @@ -90,7 +90,7 @@ odm_GetDefaultCrytaltalCap( return CrystalCap; } -VOID +static VOID odm_SetATCStatus( IN PVOID pDM_VOID, IN BOOLEAN ATCStatus @@ -106,7 +106,7 @@ odm_SetATCStatus( pCfoTrack->bATCStatus = ATCStatus; } -BOOLEAN +static BOOLEAN odm_GetATCStatus( IN PVOID pDM_VOID ) diff --git a/hal/phydm/phydm_dynamictxpower.c b/hal/phydm/phydm_dynamictxpower.c index 79c1729..b0045c4 100644 --- a/hal/phydm/phydm_dynamictxpower.c +++ b/hal/phydm/phydm_dynamictxpower.c @@ -128,7 +128,7 @@ odm_DynamicTxPowerWritePowerIndex( } -VOID +static VOID odm_DynamicTxPowerNIC_CE( IN PVOID pDM_VOID ) diff --git a/hal/phydm/phydm_noisemonitor.c b/hal/phydm/phydm_noisemonitor.c index f9fd923..e598234 100644 --- a/hal/phydm/phydm_noisemonitor.c +++ b/hal/phydm/phydm_noisemonitor.c @@ -41,7 +41,7 @@ #if (DM_ODM_SUPPORT_TYPE & (ODM_CE|ODM_WIN)) -s2Byte odm_InbandNoise_Monitor_NSeries(PDM_ODM_T pDM_Odm,u8 bPauseDIG,u8 IGIValue,u32 max_time) +static s2Byte odm_InbandNoise_Monitor_NSeries(PDM_ODM_T pDM_Odm,u8 bPauseDIG,u8 IGIValue,u32 max_time) { u4Byte tmp4b; u1Byte max_rf_path=0,rf_path; @@ -178,7 +178,7 @@ s2Byte odm_InbandNoise_Monitor_NSeries(PDM_ODM_T pDM_Odm,u8 bPauseDIG,u8 IGIValu } -s2Byte +static s2Byte odm_InbandNoise_Monitor_ACSeries(PDM_ODM_T pDM_Odm, u8 bPauseDIG, u8 IGIValue, u32 max_time ) { diff --git a/include/ieee80211.h b/include/ieee80211.h index a3f08be..c759130 100644 --- a/include/ieee80211.h +++ b/include/ieee80211.h @@ -1473,7 +1473,7 @@ enum ieee80211_state { #define IP_FMT "%d.%d.%d.%d" #define IP_ARG(x) ((u8 *)(x))[0], ((u8 *)(x))[1], ((u8 *)(x))[2], ((u8 *)(x))[3] #define PORT_FMT "%u" -#define PORT_ARG(x) ntohs(*((u16 *)(x))) +#define PORT_ARG(x) ntohs(*((__be16 *)(x))) #ifdef PLATFORM_FREEBSD /* Baron change func to macro */ #define is_multicast_mac_addr(Addr) ((((Addr[0]) & 0x01) == 0x01) && ((Addr[0]) != 0xff)) diff --git a/include/rtw_cmd.h b/include/rtw_cmd.h index 12015db..eef01da 100644 --- a/include/rtw_cmd.h +++ b/include/rtw_cmd.h @@ -1230,7 +1230,7 @@ enum rtw_h2c_cmd { #define _SetRFReg_CMD_ _Write_RFREG_CMD_ #ifdef _RTW_CMD_C_ -struct _cmd_callback rtw_cmd_callback[] = { +static struct _cmd_callback rtw_cmd_callback[] = { {GEN_CMD_CODE(_Read_MACREG), &rtw_getmacreg_cmdrsp_callback}, /*0*/ {GEN_CMD_CODE(_Write_MACREG), NULL}, {GEN_CMD_CODE(_Read_BBREG), &rtw_getbbrfreg_cmdrsp_callback}, diff --git a/include/rtw_mlme_ext.h b/include/rtw_mlme_ext.h index 9bc7c32..fe22253 100644 --- a/include/rtw_mlme_ext.h +++ b/include/rtw_mlme_ext.h @@ -1105,7 +1105,7 @@ u8 rtw_getmacreg_hdl(_adapter *padapter, u8 *pbuf); #ifdef _RTW_CMD_C_ -struct cmd_hdl wlancmds[] = { +static struct cmd_hdl wlancmds[] = { GEN_DRV_CMD_HANDLER(sizeof(struct readMAC_parm), rtw_getmacreg) /*0*/ GEN_DRV_CMD_HANDLER(0, NULL) GEN_DRV_CMD_HANDLER(0, NULL) diff --git a/include/sta_info.h b/include/sta_info.h index b8d60c9..51e1fad 100644 --- a/include/sta_info.h +++ b/include/sta_info.h @@ -131,9 +131,9 @@ struct stainfo_stats { struct session_tracker { _list list; /* session_tracker_queue */ u32 local_naddr; - u16 local_port; + __be16 local_port; u32 remote_naddr; - u16 remote_port; + __be16 remote_port; u32 set_time; u8 status; }; diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index 46f2dec..557fcb6 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -88,10 +88,10 @@ module_param(rtw_usb_rxagg_mode, int, 0644); #ifdef RTW_LOG_LEVEL uint rtw_drv_log_level = (uint)RTW_LOG_LEVEL; /* from Makefile */ #else - uint rtw_drv_log_level = _DRV_INFO_; + uint rtw_drv_log_level = _DRV_ERR_; #endif module_param(rtw_drv_log_level, uint, 0644); -MODULE_PARM_DESC(rtw_drv_log_level, "set log level when insert driver module, default log level is _DRV_INFO_ = 4"); +MODULE_PARM_DESC(rtw_drv_log_level, "set log level when insert driver module, default log level is _DRV_INFO_ = 2"); int rtw_radio_enable = 1; int rtw_long_retry_lmt = 7;