linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Staging: r8188eu: core: rtw_xmit: Fixed a few coding style issues
@ 2022-06-18 20:44 Chang Yu
  2022-06-19 13:27 ` Pavel Skripkin
  2022-06-19 19:42 ` [PATCH v2 0/5] Fixed some coding style issues and spelling Chang Yu
  0 siblings, 2 replies; 9+ messages in thread
From: Chang Yu @ 2022-06-18 20:44 UTC (permalink / raw)
  To: Larry.Finger; +Cc: linux-staging, linux-kernel, Chang Yu

Fixed a few coding style issues and spelling errors in the comments.

Signed-off-by: Chang Yu <marcus.yu.56@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_xmit.c | 28 ++++++++++---------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 3d8e9dea7651..943422141c8b 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -16,16 +16,13 @@ static u8 RFC1042_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0x00 };
 
 static void _init_txservq(struct tx_servq *ptxservq)
 {
-
 	INIT_LIST_HEAD(&ptxservq->tx_pending);
 	rtw_init_queue(&ptxservq->sta_pending);
 	ptxservq->qcnt = 0;
-
 }
 
 void	_rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv)
 {
-
 	memset((unsigned char *)psta_xmitpriv, 0, sizeof(struct sta_xmit_priv));
 	spin_lock_init(&psta_xmitpriv->lock);
 	_init_txservq(&psta_xmitpriv->be_q);
@@ -34,7 +31,6 @@ void	_rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv)
 	_init_txservq(&psta_xmitpriv->vo_q);
 	INIT_LIST_HEAD(&psta_xmitpriv->legacy_dz);
 	INIT_LIST_HEAD(&psta_xmitpriv->apsd);
-
 }
 
 s32	_rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
@@ -300,6 +296,7 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
 			/* check HT op mode */
 			if (pattrib->ht_en) {
 				u8 htopmode = pmlmeinfo->HT_protection;
+
 				if ((pmlmeext->cur_bwmode && (htopmode == 2 || htopmode == 3)) ||
 				    (!pmlmeext->cur_bwmode && htopmode == 3)) {
 					pattrib->vcs_mode = RTS_CTS;
@@ -446,10 +443,11 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
 
 	pattrib->pktlen = pktfile.pkt_len;
 
-	if (ETH_P_IP == pattrib->ether_type) {
+	if (pattrib->ether_type == ETH_P_IP) {
 		/*  The following is for DHCP and ARP packet, we use cck1M to tx these packets and let LPS awake some time */
 		/*  to prevent DHCP protocol fail */
 		u8 tmp[24];
+
 		_rtw_pktfile_read(&pktfile, &tmp[0], 24);
 		pattrib->dhcp_pkt = 0;
 		if (pktfile.pkt_len > 282) {/* MINIMUM_DHCP_PACKET_SIZE) { */
@@ -628,7 +626,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
 				if (pframe[1] & 2)  /* From Ds == 1 */
 					rtw_secmicappend(&micdata, &pframe[24], 6);
 				else
-				rtw_secmicappend(&micdata, &pframe[10], 6);
+					rtw_secmicappend(&micdata, &pframe[10], 6);
 			} else {	/* ToDS == 0 */
 				rtw_secmicappend(&micdata, &pframe[4], 6);   /* DA */
 				if (pframe[1] & 2)  /* From Ds == 1 */
@@ -954,12 +952,11 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
 			mpdu_len -= llc_sz;
 		}
 
-		if ((pattrib->icv_len > 0) && (pattrib->bswenc)) {
+		if ((pattrib->icv_len > 0) && (pattrib->bswenc))
 			mpdu_len -= pattrib->icv_len;
-		}
 
 		if (bmcst) {
-			/*  don't do fragment to broadcat/multicast packets */
+			/*  don't do fragment to broadcast/multicast packets */
 			mem_sz = _rtw_pktfile_read(&pktfile, pframe, pattrib->pktlen);
 		} else {
 			mem_sz = _rtw_pktfile_read(&pktfile, pframe, mpdu_len);
@@ -1069,7 +1066,6 @@ void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len)
 		}
 		break;
 	}
-
 }
 
 void rtw_count_tx_stats(struct adapter *padapter, struct xmit_frame *pxmitframe, int sz)
@@ -1316,7 +1312,6 @@ void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pfram
 		rtw_free_xmitframe(pxmitpriv, pxmitframe);
 	}
 	spin_unlock_bh(&pframequeue->lock);
-
 }
 
 s32 rtw_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitframe)
@@ -1515,7 +1510,6 @@ void rtw_init_hwxmits(struct hw_xmit *phwxmit, int entry)
 
 	for (i = 0; i < entry; i++, phwxmit++)
 		phwxmit->accnt = 0;
-
 }
 
 static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
@@ -1742,7 +1736,7 @@ int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fra
 	bool bmcst = is_multicast_ether_addr(pattrib->ra);
 
 	if (!check_fwstate(pmlmepriv, WIFI_AP_STATE))
-	    return ret;
+		return ret;
 
 	if (pattrib->psta)
 		psta = pattrib->psta;
@@ -1770,8 +1764,8 @@ int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fra
 
 			pstapriv->tim_bitmap |= BIT(0);/*  */
 			pstapriv->sta_dz_bitmap |= BIT(0);
-
-			update_beacon(padapter, _TIM_IE_, NULL, false);/* tx bc/mc packets after upate bcn */
+			/* tx bc/mc packets after update bcn */
+			update_beacon(padapter, _TIM_IE_, NULL, false);
 
 			ret = true;
 		}
@@ -1821,7 +1815,7 @@ int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fra
 				pstapriv->tim_bitmap |= BIT(psta->aid);
 
 				if (psta->sleepq_len == 1) {
-					/* upate BCN for TIM IE */
+					/* update BCN for TIM IE */
 					update_beacon(padapter, _TIM_IE_, NULL, false);
 				}
 			}
@@ -2090,7 +2084,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
 		if ((psta->sleepq_ac_len == 0) && (!psta->has_legacy_ac) && (wmmps_ac)) {
 			pstapriv->tim_bitmap &= ~BIT(psta->aid);
 
-			/* upate BCN for TIM IE */
+			/* update BCN for TIM IE */
 			update_beacon(padapter, _TIM_IE_, NULL, false);
 		}
 	}
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] Staging: r8188eu: core: rtw_xmit: Fixed a few coding style issues
  2022-06-18 20:44 [PATCH] Staging: r8188eu: core: rtw_xmit: Fixed a few coding style issues Chang Yu
@ 2022-06-19 13:27 ` Pavel Skripkin
  2022-06-19 19:42 ` [PATCH v2 0/5] Fixed some coding style issues and spelling Chang Yu
  1 sibling, 0 replies; 9+ messages in thread
From: Pavel Skripkin @ 2022-06-19 13:27 UTC (permalink / raw)
  To: Chang Yu, Larry.Finger; +Cc: linux-staging, linux-kernel

Hi Chang,

On 6/18/22 23:44, Chang Yu wrote:
> Fixed a few coding style issues and spelling errors in the comments.
> 
> Signed-off-by: Chang Yu <marcus.yu.56@gmail.com>
> ---

You are doing a lot of different changes in one patch. Please, separate 
each clean up into its own patch




Thanks,
--Pavel Skripkin

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 0/5] Fixed some coding style issues and spelling
  2022-06-18 20:44 [PATCH] Staging: r8188eu: core: rtw_xmit: Fixed a few coding style issues Chang Yu
  2022-06-19 13:27 ` Pavel Skripkin
@ 2022-06-19 19:42 ` Chang Yu
  2022-06-19 19:42   ` [PATCH v2 1/5] Staging: r8188eu: core: rtw_xmit: Fixed some whitespace coding style issues Chang Yu
                     ` (5 more replies)
  1 sibling, 6 replies; 9+ messages in thread
From: Chang Yu @ 2022-06-19 19:42 UTC (permalink / raw)
  To: Larry.Finger, paskripkin; +Cc: linux-staging, linux-kernel, Chang Yu

Fixed a few coding style issues and some spelling errors in the
comments.

Changes in v2:
Separated the original big patch into 5 smaller patches so that each
clean up is in its own patch.

Chang Yu (5):
  Staging: r8188eu: core: rtw_xmit: Fixed some whitespace coding style
    issues
  Staging: r8188eu: core: rtw_xmit: Fixed two indentation coding style
    issues.
  Staging: r8188eu: core: rtw_xmit: Fixed some spelling errors in the
    comments
  Staging: r8188eu: core: rtw_xmit: Fixed a brace coding style issue
  Staging: r8188eu: core: rtw_xmit: Fixed a coding style issue

 drivers/staging/r8188eu/core/rtw_xmit.c | 28 ++++++++++---------------
 1 file changed, 11 insertions(+), 17 deletions(-)

-- 
2.36.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/5] Staging: r8188eu: core: rtw_xmit: Fixed some whitespace coding style issues
  2022-06-19 19:42 ` [PATCH v2 0/5] Fixed some coding style issues and spelling Chang Yu
@ 2022-06-19 19:42   ` Chang Yu
  2022-06-19 19:42   ` [PATCH v2 2/5] Staging: r8188eu: core: rtw_xmit: Fixed two indentation " Chang Yu
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Chang Yu @ 2022-06-19 19:42 UTC (permalink / raw)
  To: Larry.Finger, paskripkin; +Cc: linux-staging, linux-kernel, Chang Yu

Removed superfluous blank lines and added blank lines after variable
declarations as per checkpath.pl

Signed-off-by: Chang Yu <marcus.yu.56@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_xmit.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 3d8e9dea7651..1aa284453ab2 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -16,16 +16,13 @@ static u8 RFC1042_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0x00 };
 
 static void _init_txservq(struct tx_servq *ptxservq)
 {
-
 	INIT_LIST_HEAD(&ptxservq->tx_pending);
 	rtw_init_queue(&ptxservq->sta_pending);
 	ptxservq->qcnt = 0;
-
 }
 
 void	_rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv)
 {
-
 	memset((unsigned char *)psta_xmitpriv, 0, sizeof(struct sta_xmit_priv));
 	spin_lock_init(&psta_xmitpriv->lock);
 	_init_txservq(&psta_xmitpriv->be_q);
@@ -34,7 +31,6 @@ void	_rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv)
 	_init_txservq(&psta_xmitpriv->vo_q);
 	INIT_LIST_HEAD(&psta_xmitpriv->legacy_dz);
 	INIT_LIST_HEAD(&psta_xmitpriv->apsd);
-
 }
 
 s32	_rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
@@ -300,6 +296,7 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
 			/* check HT op mode */
 			if (pattrib->ht_en) {
 				u8 htopmode = pmlmeinfo->HT_protection;
+
 				if ((pmlmeext->cur_bwmode && (htopmode == 2 || htopmode == 3)) ||
 				    (!pmlmeext->cur_bwmode && htopmode == 3)) {
 					pattrib->vcs_mode = RTS_CTS;
@@ -450,6 +447,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
 		/*  The following is for DHCP and ARP packet, we use cck1M to tx these packets and let LPS awake some time */
 		/*  to prevent DHCP protocol fail */
 		u8 tmp[24];
+
 		_rtw_pktfile_read(&pktfile, &tmp[0], 24);
 		pattrib->dhcp_pkt = 0;
 		if (pktfile.pkt_len > 282) {/* MINIMUM_DHCP_PACKET_SIZE) { */
@@ -1069,7 +1067,6 @@ void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len)
 		}
 		break;
 	}
-
 }
 
 void rtw_count_tx_stats(struct adapter *padapter, struct xmit_frame *pxmitframe, int sz)
@@ -1316,7 +1313,6 @@ void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pfram
 		rtw_free_xmitframe(pxmitpriv, pxmitframe);
 	}
 	spin_unlock_bh(&pframequeue->lock);
-
 }
 
 s32 rtw_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitframe)
@@ -1515,7 +1511,6 @@ void rtw_init_hwxmits(struct hw_xmit *phwxmit, int entry)
 
 	for (i = 0; i < entry; i++, phwxmit++)
 		phwxmit->accnt = 0;
-
 }
 
 static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 2/5] Staging: r8188eu: core: rtw_xmit: Fixed two indentation coding style issues.
  2022-06-19 19:42 ` [PATCH v2 0/5] Fixed some coding style issues and spelling Chang Yu
  2022-06-19 19:42   ` [PATCH v2 1/5] Staging: r8188eu: core: rtw_xmit: Fixed some whitespace coding style issues Chang Yu
@ 2022-06-19 19:42   ` Chang Yu
  2022-06-19 19:42   ` [PATCH v2 3/5] Staging: r8188eu: core: rtw_xmit: Fixed some spelling errors in the comments Chang Yu
                     ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Chang Yu @ 2022-06-19 19:42 UTC (permalink / raw)
  To: Larry.Finger, paskripkin; +Cc: linux-staging, linux-kernel, Chang Yu

Fixed two indentation issues.

Signed-off-by: Chang Yu <marcus.yu.56@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_xmit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 1aa284453ab2..2bc059808a71 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -626,7 +626,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
 				if (pframe[1] & 2)  /* From Ds == 1 */
 					rtw_secmicappend(&micdata, &pframe[24], 6);
 				else
-				rtw_secmicappend(&micdata, &pframe[10], 6);
+					rtw_secmicappend(&micdata, &pframe[10], 6);
 			} else {	/* ToDS == 0 */
 				rtw_secmicappend(&micdata, &pframe[4], 6);   /* DA */
 				if (pframe[1] & 2)  /* From Ds == 1 */
@@ -1737,7 +1737,7 @@ int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fra
 	bool bmcst = is_multicast_ether_addr(pattrib->ra);
 
 	if (!check_fwstate(pmlmepriv, WIFI_AP_STATE))
-	    return ret;
+		return ret;
 
 	if (pattrib->psta)
 		psta = pattrib->psta;
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 3/5] Staging: r8188eu: core: rtw_xmit: Fixed some spelling errors in the comments
  2022-06-19 19:42 ` [PATCH v2 0/5] Fixed some coding style issues and spelling Chang Yu
  2022-06-19 19:42   ` [PATCH v2 1/5] Staging: r8188eu: core: rtw_xmit: Fixed some whitespace coding style issues Chang Yu
  2022-06-19 19:42   ` [PATCH v2 2/5] Staging: r8188eu: core: rtw_xmit: Fixed two indentation " Chang Yu
@ 2022-06-19 19:42   ` Chang Yu
  2022-06-19 19:42   ` [PATCH v2 4/5] Staging: r8188eu: core: rtw_xmit: Fixed a brace coding style issue Chang Yu
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Chang Yu @ 2022-06-19 19:42 UTC (permalink / raw)
  To: Larry.Finger, paskripkin; +Cc: linux-staging, linux-kernel, Chang Yu

Fixed the spelling of "broadcast" and "update" in the comments.

Signed-off-by: Chang Yu <marcus.yu.56@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_xmit.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 2bc059808a71..73eb2f01c176 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -957,7 +957,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
 		}
 
 		if (bmcst) {
-			/*  don't do fragment to broadcat/multicast packets */
+			/*  don't do fragment to broadcast/multicast packets */
 			mem_sz = _rtw_pktfile_read(&pktfile, pframe, pattrib->pktlen);
 		} else {
 			mem_sz = _rtw_pktfile_read(&pktfile, pframe, mpdu_len);
@@ -1765,8 +1765,8 @@ int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fra
 
 			pstapriv->tim_bitmap |= BIT(0);/*  */
 			pstapriv->sta_dz_bitmap |= BIT(0);
-
-			update_beacon(padapter, _TIM_IE_, NULL, false);/* tx bc/mc packets after upate bcn */
+			/* tx bc/mc packets after update bcn */
+			update_beacon(padapter, _TIM_IE_, NULL, false);
 
 			ret = true;
 		}
@@ -1816,7 +1816,7 @@ int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fra
 				pstapriv->tim_bitmap |= BIT(psta->aid);
 
 				if (psta->sleepq_len == 1) {
-					/* upate BCN for TIM IE */
+					/* update BCN for TIM IE */
 					update_beacon(padapter, _TIM_IE_, NULL, false);
 				}
 			}
@@ -2085,7 +2085,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
 		if ((psta->sleepq_ac_len == 0) && (!psta->has_legacy_ac) && (wmmps_ac)) {
 			pstapriv->tim_bitmap &= ~BIT(psta->aid);
 
-			/* upate BCN for TIM IE */
+			/* update BCN for TIM IE */
 			update_beacon(padapter, _TIM_IE_, NULL, false);
 		}
 	}
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 4/5] Staging: r8188eu: core: rtw_xmit: Fixed a brace coding style issue
  2022-06-19 19:42 ` [PATCH v2 0/5] Fixed some coding style issues and spelling Chang Yu
                     ` (2 preceding siblings ...)
  2022-06-19 19:42   ` [PATCH v2 3/5] Staging: r8188eu: core: rtw_xmit: Fixed some spelling errors in the comments Chang Yu
@ 2022-06-19 19:42   ` Chang Yu
  2022-06-19 19:42   ` [PATCH v2 5/5] Staging: r8188eu: core: rtw_xmit: Fixed a " Chang Yu
  2022-06-20 20:04   ` [PATCH v2 0/5] Fixed some coding style issues and spelling Philipp Hortmann
  5 siblings, 0 replies; 9+ messages in thread
From: Chang Yu @ 2022-06-19 19:42 UTC (permalink / raw)
  To: Larry.Finger, paskripkin; +Cc: linux-staging, linux-kernel, Chang Yu

Removed superfluous brackets around a if clause as per checkpatch.pl

Signed-off-by: Chang Yu <marcus.yu.56@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_xmit.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 73eb2f01c176..6797335f7855 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -952,9 +952,8 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
 			mpdu_len -= llc_sz;
 		}
 
-		if ((pattrib->icv_len > 0) && (pattrib->bswenc)) {
+		if ((pattrib->icv_len > 0) && (pattrib->bswenc))
 			mpdu_len -= pattrib->icv_len;
-		}
 
 		if (bmcst) {
 			/*  don't do fragment to broadcast/multicast packets */
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 5/5] Staging: r8188eu: core: rtw_xmit: Fixed a coding style issue
  2022-06-19 19:42 ` [PATCH v2 0/5] Fixed some coding style issues and spelling Chang Yu
                     ` (3 preceding siblings ...)
  2022-06-19 19:42   ` [PATCH v2 4/5] Staging: r8188eu: core: rtw_xmit: Fixed a brace coding style issue Chang Yu
@ 2022-06-19 19:42   ` Chang Yu
  2022-06-20 20:04   ` [PATCH v2 0/5] Fixed some coding style issues and spelling Philipp Hortmann
  5 siblings, 0 replies; 9+ messages in thread
From: Chang Yu @ 2022-06-19 19:42 UTC (permalink / raw)
  To: Larry.Finger, paskripkin; +Cc: linux-staging, linux-kernel, Chang Yu

Moved the constant ETH_P_IP to the right hand side of the comparison as
per checkpatch.pl

Signed-off-by: Chang Yu <marcus.yu.56@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 6797335f7855..943422141c8b 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -443,7 +443,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
 
 	pattrib->pktlen = pktfile.pkt_len;
 
-	if (ETH_P_IP == pattrib->ether_type) {
+	if (pattrib->ether_type == ETH_P_IP) {
 		/*  The following is for DHCP and ARP packet, we use cck1M to tx these packets and let LPS awake some time */
 		/*  to prevent DHCP protocol fail */
 		u8 tmp[24];
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/5] Fixed some coding style issues and spelling
  2022-06-19 19:42 ` [PATCH v2 0/5] Fixed some coding style issues and spelling Chang Yu
                     ` (4 preceding siblings ...)
  2022-06-19 19:42   ` [PATCH v2 5/5] Staging: r8188eu: core: rtw_xmit: Fixed a " Chang Yu
@ 2022-06-20 20:04   ` Philipp Hortmann
  5 siblings, 0 replies; 9+ messages in thread
From: Philipp Hortmann @ 2022-06-20 20:04 UTC (permalink / raw)
  To: Chang Yu, Larry.Finger, paskripkin; +Cc: linux-staging, linux-kernel

On 6/19/22 21:42, Chang Yu wrote:
> Fixed a few coding style issues and some spelling errors in the
> comments.
> 
> Changes in v2:
> Separated the original big patch into 5 smaller patches so that each
> clean up is in its own patch.
> 
> Chang Yu (5):
>    Staging: r8188eu: core: rtw_xmit: Fixed some whitespace coding style
>      issues
>    Staging: r8188eu: core: rtw_xmit: Fixed two indentation coding style
>      issues.
>    Staging: r8188eu: core: rtw_xmit: Fixed some spelling errors in the
>      comments
>    Staging: r8188eu: core: rtw_xmit: Fixed a brace coding style issue
>    Staging: r8188eu: core: rtw_xmit: Fixed a coding style issue
> 
>   drivers/staging/r8188eu/core/rtw_xmit.c | 28 ++++++++++---------------
>   1 file changed, 11 insertions(+), 17 deletions(-)
> 

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 
Adapter

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-06-20 20:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-18 20:44 [PATCH] Staging: r8188eu: core: rtw_xmit: Fixed a few coding style issues Chang Yu
2022-06-19 13:27 ` Pavel Skripkin
2022-06-19 19:42 ` [PATCH v2 0/5] Fixed some coding style issues and spelling Chang Yu
2022-06-19 19:42   ` [PATCH v2 1/5] Staging: r8188eu: core: rtw_xmit: Fixed some whitespace coding style issues Chang Yu
2022-06-19 19:42   ` [PATCH v2 2/5] Staging: r8188eu: core: rtw_xmit: Fixed two indentation " Chang Yu
2022-06-19 19:42   ` [PATCH v2 3/5] Staging: r8188eu: core: rtw_xmit: Fixed some spelling errors in the comments Chang Yu
2022-06-19 19:42   ` [PATCH v2 4/5] Staging: r8188eu: core: rtw_xmit: Fixed a brace coding style issue Chang Yu
2022-06-19 19:42   ` [PATCH v2 5/5] Staging: r8188eu: core: rtw_xmit: Fixed a " Chang Yu
2022-06-20 20:04   ` [PATCH v2 0/5] Fixed some coding style issues and spelling Philipp Hortmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).