staging: rtl8188eu: cleanup style issues in xmit_linux.c
cover staging: rtl8188eu: cleanup style issues in xmit_linux.c
This series clears most of the remaining style/checkpatch issues in the file os_dep/xmit_linux.c.
Michael Straube (4):
staging: rtl8188eu: use __func__ instead of hardcoded name - style
staging: rtl8188eu: add spaces around operators - style
staging: rtl8188eu: cleanup lines over 80 characters - style
staging: rtl8188eu: remove whitespace - style
drivers/staging/rtl8188eu/os_dep/xmit_linux.c | 45 ++++++++++++------- 1 file changed, 28 insertions(+), 17 deletions(-)
Signature · 1 line
2.19.1
PATCH 1/4 staging: rtl8188eu: use __func__ instead of hardcoded name - style
Use __func__ instead of hardcoded function name in rtw_xmit_entry(). Reported by checkpatch.
--- drivers/staging/rtl8188eu/os_dep/xmit_linux.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/staging/rtl8188eu/os_dep/xmit_linux.c +6 -3
@@ -166,7 +166,8 @@ int rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev)RT_TRACE (_module_rtl871x_mlme_c_, _drv_info_, ("+xmit_enry\n" ));if (rtw_if_up (padapter) == false) { -RT_TRACE (_module_xmit_osdep_c_, _drv_err_, ("rtw_xmit_entry: rtw_if_up fail\n" )); +RT_TRACE (_module_xmit_osdep_c_, _drv_err_, + ("%s: rtw_if_up fail\n" , __func__)); goto drop_packet; }
@@ -187,13 +188,15 @@ int rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev) goto drop_packet; pxmitpriv->tx_pkts++; -RT_TRACE (_module_xmit_osdep_c_, _drv_info_, ("rtw_xmit_entry: tx_pkts=%d\n" , (u32 )pxmitpriv->tx_pkts)); +RT_TRACE (_module_xmit_osdep_c_, _drv_info_, + ("%s: tx_pkts=%d\n" , __func__, (u32 )pxmitpriv->tx_pkts)); goto exit; drop_packet: pxmitpriv->tx_drop++;dev_kfree_skb_any (pkt); -RT_TRACE (_module_xmit_osdep_c_, _drv_notice_, ("rtw_xmit_entry: drop, tx_drop=%d\n" , (u32 )pxmitpriv->tx_drop)); +RT_TRACE (_module_xmit_osdep_c_, _drv_notice_, + ("%s: drop, tx_drop=%d\n" , __func__, (u32 )pxmitpriv->tx_drop)); exit:return 0 ;
Signature · 1 line
2.19.1
PATCH 2/4 staging: rtl8188eu: add spaces around operators - style
In reply to Michael StraubeAdd spaces around '*' and '/' to follow kernel coding style. Reported by checkpatch.
--- drivers/staging/rtl8188eu/os_dep/xmit_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8188eu/os_dep/xmit_linux.c +2 -2
@@ -45,7 +45,7 @@ void rtw_os_xmit_resource_free(struct xmit_buf *pxmitbuf)kfree (pxmitbuf->pallocated_buf); } -#define WMM_XMIT_THRESHOLD (NR_XMITFRAME*2/5) +#define WMM_XMIT_THRESHOLD (NR_XMITFRAME * 2 / 5)void rtw_os_pkt_complete (struct adapter *padapter,struct sk_buff *pkt) {
@@ -176,7 +176,7 @@ int rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev)if (!rtw_mc2u_disable &&check_fwstate (pmlmepriv,WIFI_AP_STATE ) && (IP_MCAST_MAC (pkt->data) ||ICMPV6_MCAST_MAC (pkt->data)) && (padapter->registrypriv.wifi_spec ==0 )) { -if (pxmitpriv->free_xmitframe_cnt > (NR_XMITFRAME /4 )) { +if (pxmitpriv->free_xmitframe_cnt >NR_XMITFRAME /4 ) { res =rtw_mlcst2unicst (padapter, pkt);if (res) goto exit;
Signature · 1 line
2.19.1
PATCH 3/4 staging: rtl8188eu: cleanup lines over 80 characters - style
In reply to Michael StraubeClear 'line over 80 characters' checkpatch warnings by adding appropriate line breaks and moving a comment.
--- drivers/staging/rtl8188eu/os_dep/xmit_linux.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
drivers/staging/rtl8188eu/os_dep/xmit_linux.c +13 -5
@@ -14,7 +14,8 @@#include <xmit_osdep.h> #include <osdep_intf.h> -int rtw_os_xmit_resource_alloc (struct adapter *padapter,struct xmit_buf *pxmitbuf,u32 alloc_sz) +int rtw_os_xmit_resource_alloc (struct adapter *padapter, +struct xmit_buf *pxmitbuf,u32 alloc_sz) {int i;
@@ -89,7 +90,8 @@ void rtw_os_xmit_schedule(struct adapter *padapter)spin_unlock_bh (&pxmitpriv->lock); } -static void rtw_check_xmit_resource (struct adapter *padapter,struct sk_buff *pkt) +static void rtw_check_xmit_resource (struct adapter *padapter, +struct sk_buff *pkt) {struct xmit_priv *pxmitpriv = &padapter->xmitpriv;u16 queue;
@@ -136,18 +138,24 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)memcpy (newskb->data, psta->hwaddr,6 ); res =rtw_xmit (padapter, &newskb);if (res <0 ) { -DBG_88E ("%s()-%d: rtw_xmit() return error!\n" , __func__, __LINE__); +DBG_88E ("%s()-%d: rtw_xmit() return error!\n" , + __func__, __LINE__); pxmitpriv->tx_drop++;dev_kfree_skb_any (newskb); }else { pxmitpriv->tx_pkts++; } }else { -DBG_88E ("%s-%d: skb_copy() failed!\n" , __func__, __LINE__); +DBG_88E ("%s-%d: skb_copy() failed!\n" , + __func__, __LINE__); pxmitpriv->tx_drop++;spin_unlock_bh (&pstapriv->asoc_list_lock); -return false;/* Caller shall tx this multicast frame via normal way. */ + +/* Caller shall tx this multicast frame +* via normal way. +*/ +return false; } }
Signature · 1 line
2.19.1
PATCH 4/4 staging: rtl8188eu: remove whitespace - style
In reply to Michael StraubeReplace tabs with spaces and/or remove extra spaces where appropriate.
--- drivers/staging/rtl8188eu/os_dep/xmit_linux.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/staging/rtl8188eu/os_dep/xmit_linux.c +7 -7
@@ -50,7 +50,7 @@ void rtw_os_xmit_resource_free(struct xmit_buf *pxmitbuf)void rtw_os_pkt_complete (struct adapter *padapter,struct sk_buff *pkt) { -u16 queue; +u16 queue;struct xmit_priv *pxmitpriv = &padapter->xmitpriv; queue =skb_get_queue_mapping (pkt);
@@ -94,7 +94,7 @@ static void rtw_check_xmit_resource(struct adapter *padapter, struct sk_buff *pkt) {struct xmit_priv *pxmitpriv = &padapter->xmitpriv; -u16 queue; +u16 queue; queue =skb_get_queue_mapping (pkt);if (padapter->registrypriv.wifi_spec) {
@@ -111,12 +111,12 @@ static void rtw_check_xmit_resource(struct adapter *padapter,static int rtw_mlcst2unicst (struct adapter *padapter,struct sk_buff *skb) { -struct sta_priv *pstapriv = &padapter->stapriv; +struct sta_priv *pstapriv = &padapter->stapriv;struct xmit_priv *pxmitpriv = &padapter->xmitpriv;struct list_head *phead, *plist;struct sk_buff *newskb;struct sta_info *psta =NULL ; -s32 res; +s32 res;spin_lock_bh (&pstapriv->asoc_list_lock); phead = &pstapriv->asoc_list;
@@ -128,7 +128,7 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb) plist = plist->next; -/* avoid come from STA1 and send back STA1 */ +/* avoid come from STA1 and send back STA1 */ if (!memcmp (psta->hwaddr, &skb->data[6 ],6 ))continue ;
@@ -164,11 +164,11 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)return true; } -int rtw_xmit_entry (struct sk_buff *pkt,struct net_device *pnetdev) +int rtw_xmit_entry (struct sk_buff *pkt,struct net_device *pnetdev) {struct adapter *padapter = (struct adapter *)rtw_netdev_priv (pnetdev);struct xmit_priv *pxmitpriv = &padapter->xmitpriv; -struct mlme_priv *pmlmepriv = &padapter->mlmepriv; +struct mlme_priv *pmlmepriv = &padapter->mlmepriv;s32 res =0 ;RT_TRACE (_module_rtl871x_mlme_c_, _drv_info_, ("+xmit_enry\n" ));
Signature · 1 line
2.19.1