Re: [PATCH 1/9] staging: rtl8188eu: cleanup declarations in rtw_mlme_ext.c
On Sat, Dec 15, 2018 at 05:46:08PM +0100, Michael Straube wrote: > Replace tabs with spaces and/or remove spaces in declarations. > Remove unused/commented declarations, remove unnecessary comment, > remove blank lines between declarations and add missing lines after > declarations. Also clears some line over 80 characters checkpatch > warnings. That is a lot of different things to do all in one patch :( Please break this up into "one logical thing per patch" please, so it can be reviewed easier. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/9] staging: rtl8188eu: cleanup declarations in rtw_mlme_ext.c
On 12/15/18 5:53 PM, Joe Perches wrote: On Sat, 2018-12-15 at 17:46 +0100, Michael Straube wrote: Replace tabs with spaces and/or remove spaces in declarations. Remove unused/commented declarations, remove unnecessary comment, remove blank lines between declarations and add missing lines after declarations. Also clears some line over 80 characters checkpatch warnings. [] diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c [] @@ -22,14 +22,14 @@ static u8 null_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0}; /** OUI definitions for the vendor specific IE ***/ -unsigned char RTW_WPA_OUI[] = {0x00, 0x50, 0xf2, 0x01}; +unsigned char RTW_WPA_OUI[] = {0x00, 0x50, 0xf2, 0x01}; unsigned char WMM_OUI[] = {0x00, 0x50, 0xf2, 0x02}; -unsigned char WPS_OUI[] = {0x00, 0x50, 0xf2, 0x04}; -unsigned char P2P_OUI[] = {0x50, 0x6F, 0x9A, 0x09}; -unsigned char WFD_OUI[] = {0x50, 0x6F, 0x9A, 0x0A}; +unsigned char WPS_OUI[] = {0x00, 0x50, 0xf2, 0x04}; +unsigned char P2P_OUI[] = {0x50, 0x6F, 0x9A, 0x09}; +unsigned char WFD_OUI[] = {0x50, 0x6F, 0x9A, 0x0A}; -unsigned char WMM_INFO_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01}; -unsigned char WMM_PARA_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01}; +unsigned char WMM_INFO_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01}; +unsigned char WMM_PARA_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01}; unsigned char WPA_TKIP_CIPHER[4] = {0x00, 0x50, 0xf2, 0x02}; unsigned char RSN_TKIP_CIPHER[4] = {0x00, 0x0f, 0xac, 0x02}; unrelated trivia: Might be nice to make some or all of these const or even static const where appropriate. Hi Joe, I've done that in patch 4/9 of this series. Michael ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/9] staging: rtl8188eu: cleanup declarations in rtw_mlme_ext.c
On Sat, 2018-12-15 at 17:46 +0100, Michael Straube wrote: > Replace tabs with spaces and/or remove spaces in declarations. > Remove unused/commented declarations, remove unnecessary comment, > remove blank lines between declarations and add missing lines after > declarations. Also clears some line over 80 characters checkpatch > warnings. [] > diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c > b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c [] > @@ -22,14 +22,14 @@ static u8 null_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0}; > /** > OUI definitions for the vendor specific IE > ***/ > -unsigned charRTW_WPA_OUI[] = {0x00, 0x50, 0xf2, 0x01}; > +unsigned char RTW_WPA_OUI[] = {0x00, 0x50, 0xf2, 0x01}; > unsigned char WMM_OUI[] = {0x00, 0x50, 0xf2, 0x02}; > -unsigned charWPS_OUI[] = {0x00, 0x50, 0xf2, 0x04}; > -unsigned charP2P_OUI[] = {0x50, 0x6F, 0x9A, 0x09}; > -unsigned charWFD_OUI[] = {0x50, 0x6F, 0x9A, 0x0A}; > +unsigned char WPS_OUI[] = {0x00, 0x50, 0xf2, 0x04}; > +unsigned char P2P_OUI[] = {0x50, 0x6F, 0x9A, 0x09}; > +unsigned char WFD_OUI[] = {0x50, 0x6F, 0x9A, 0x0A}; > > -unsigned charWMM_INFO_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01}; > -unsigned charWMM_PARA_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01}; > +unsigned char WMM_INFO_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01}; > +unsigned char WMM_PARA_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01}; > > unsigned char WPA_TKIP_CIPHER[4] = {0x00, 0x50, 0xf2, 0x02}; > unsigned char RSN_TKIP_CIPHER[4] = {0x00, 0x0f, 0xac, 0x02}; unrelated trivia: Might be nice to make some or all of these const or even static const where appropriate. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/9] staging: rtl8188eu: cleanup declarations in rtw_mlme_ext.c
Replace tabs with spaces and/or remove spaces in declarations. Remove unused/commented declarations, remove unnecessary comment, remove blank lines between declarations and add missing lines after declarations. Also clears some line over 80 characters checkpatch warnings. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 484 +- 1 file changed, 241 insertions(+), 243 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index 6790b840aef8..4996227b6a2e 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c @@ -22,14 +22,14 @@ static u8 null_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0}; /** OUI definitions for the vendor specific IE ***/ -unsigned char RTW_WPA_OUI[] = {0x00, 0x50, 0xf2, 0x01}; +unsigned char RTW_WPA_OUI[] = {0x00, 0x50, 0xf2, 0x01}; unsigned char WMM_OUI[] = {0x00, 0x50, 0xf2, 0x02}; -unsigned char WPS_OUI[] = {0x00, 0x50, 0xf2, 0x04}; -unsigned char P2P_OUI[] = {0x50, 0x6F, 0x9A, 0x09}; -unsigned char WFD_OUI[] = {0x50, 0x6F, 0x9A, 0x0A}; +unsigned char WPS_OUI[] = {0x00, 0x50, 0xf2, 0x04}; +unsigned char P2P_OUI[] = {0x50, 0x6F, 0x9A, 0x09}; +unsigned char WFD_OUI[] = {0x50, 0x6F, 0x9A, 0x0A}; -unsigned char WMM_INFO_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01}; -unsigned char WMM_PARA_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01}; +unsigned char WMM_INFO_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01}; +unsigned char WMM_PARA_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01}; unsigned char WPA_TKIP_CIPHER[4] = {0x00, 0x50, 0xf2, 0x02}; unsigned char RSN_TKIP_CIPHER[4] = {0x00, 0x0f, 0xac, 0x02}; @@ -56,7 +56,7 @@ static struct rt_channel_plan_2g RTW_ChannelPlan2G[RT_CHANNEL_DOMAIN_2G_MAX] = { {{}, 0}, /* 0x05, RT_CHANNEL_DOMAIN_2G_NULL */ }; -static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = { +static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = { /* 0x00 ~ 0x1F , Old Define = */ {0x02}, /* 0x00, RT_CHANNEL_DOMAIN_FCC */ {0x02}, /* 0x01, RT_CHANNEL_DOMAIN_IC */ @@ -154,8 +154,8 @@ int rtw_ch_set_search_ch(struct rt_channel_info *ch_set, const u32 ch) struct xmit_frame *alloc_mgtxmitframe(struct xmit_priv *pxmitpriv) { - struct xmit_frame *pmgntframe; - struct xmit_buf *pxmitbuf; + struct xmit_frame *pmgntframe; + struct xmit_buf *pxmitbuf; pmgntframe = rtw_alloc_xmitframe(pxmitpriv); if (!pmgntframe) { @@ -184,7 +184,7 @@ Following are some TX functions for WiFi MLME void update_mgnt_tx_rate(struct adapter *padapter, u8 rate) { - struct mlme_ext_priv*pmlmeext = &(padapter->mlmeextpriv); + struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); pmlmeext->tx_rate = rate; DBG_88E("%s(): rate = %x\n", __func__, rate); @@ -192,7 +192,7 @@ void update_mgnt_tx_rate(struct adapter *padapter, u8 rate) void update_mgntframe_attrib(struct adapter *padapter, struct pkt_attrib *pattrib) { - struct mlme_ext_priv*pmlmeext = &(padapter->mlmeextpriv); + struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); memset((u8 *)(pattrib), 0, sizeof(struct pkt_attrib)); @@ -313,18 +313,18 @@ static int update_hidden_ssid(u8 *ies, u32 ies_len, u8 hidden_ssid_mode) static void issue_beacon(struct adapter *padapter, int timeout_ms) { - struct xmit_frame *pmgntframe; - struct pkt_attrib *pattrib; - unsigned char *pframe; + struct xmit_frame *pmgntframe; + struct pkt_attrib *pattrib; + unsigned char *pframe; struct ieee80211_hdr *pwlanhdr; __le16 *fctrl; - unsigned intrate_len; - struct xmit_priv*pxmitpriv = &(padapter->xmitpriv); + unsigned int rate_len; + struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct mlme_ext_priv*pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info*pmlmeinfo = &(pmlmeext->mlmext_info); - struct wlan_bssid_ex*cur_network = &(pmlmeinfo->network); - u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; + struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network); + u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (!pmgntframe) { @@ -454,22 +454,22 @@ static void issue_beacon(struct adapter *padapter, int timeout_ms) static void