driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix coding style issues
@ 2020-12-05 23:21 Brother Matthew De Angelis
  2020-12-05 23:23 ` [PATCH 1/2] Staging: rtl8723bs/core: delete empty if statement Brother Matthew De Angelis
  2020-12-05 23:26 ` [PATCH 2/2] Staging: rtl8723bs/core: fix brace coding style issue Brother Matthew De Angelis
  0 siblings, 2 replies; 3+ messages in thread
From: Brother Matthew De Angelis @ 2020-12-05 23:21 UTC (permalink / raw)
  To: gregkh, hdegoede, Larry.Finger, ross.schm.dev, vkor,
	dan.carpenter, pterjan, marjargal16
  Cc: devel

Hello,

this series fixes two separate coding style issues.

1. Delete an empty if statement.

2. Fix remaining unnecessary brace coding style issues.

Brother Matthew De Angelis (2):
  Staging: rtl8723bs/core: delete empty if statement
  Staging: rtl8723bs/core: fix brace coding style issue

 drivers/staging/rtl8723bs/core/rtw_recv.c | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 1/2] Staging: rtl8723bs/core: delete empty if statement
  2020-12-05 23:21 [PATCH 0/2] Fix coding style issues Brother Matthew De Angelis
@ 2020-12-05 23:23 ` Brother Matthew De Angelis
  2020-12-05 23:26 ` [PATCH 2/2] Staging: rtl8723bs/core: fix brace coding style issue Brother Matthew De Angelis
  1 sibling, 0 replies; 3+ messages in thread
From: Brother Matthew De Angelis @ 2020-12-05 23:23 UTC (permalink / raw)
  To: gregkh, hdegoede, Larry.Finger, ross.schm.dev, vkor,
	dan.carpenter, pterjan, amarjargal16
  Cc: devel

Delete an if statement that was not executing anything when true.
This has the side effect of removing one checkpatch warning about braces
not being necessary.

Signed-off-by: Brother Matthew De Angelis <matthew.v.deangelis@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index 43e67e48d2df..ce8484e0e5b9 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -937,9 +937,6 @@ sint ap2sta_data_frame(struct adapter *adapter, union recv_frame *precv_frame,
 			goto exit;
 		}
 
-		if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE) {
-		}
-
 		if (GetFrameSubType(ptr) & BIT(6)) {
 			/* No data, will not indicate to upper layer, temporily count it here */
 			count_rx_stats(adapter, precv_frame, *psta);
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 2/2] Staging: rtl8723bs/core: fix brace coding style issue
  2020-12-05 23:21 [PATCH 0/2] Fix coding style issues Brother Matthew De Angelis
  2020-12-05 23:23 ` [PATCH 1/2] Staging: rtl8723bs/core: delete empty if statement Brother Matthew De Angelis
@ 2020-12-05 23:26 ` Brother Matthew De Angelis
  1 sibling, 0 replies; 3+ messages in thread
From: Brother Matthew De Angelis @ 2020-12-05 23:26 UTC (permalink / raw)
  To: gregkh, hdegoede, Larry.Finger, ross.schm.dev, vkor,
	dan.carpenter, pterjan, amarjargal16
  Cc: devel

Remove unnecessary braces identified by checkpatch.pl at lines 740,
1039,1602,1922,1939.

Signed-off-by: Brother Matthew De Angelis <matthew.v.deangelis@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index ce8484e0e5b9..b95d31fc8413 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -745,9 +745,8 @@ void count_rx_stats(struct adapter *padapter, union recv_frame *prframe, struct
 
 	padapter->mlmepriv.LinkDetectInfo.NumRxOkInPeriod++;
 
-	if ((!MacAddr_isBcst(pattrib->dst)) && (!IS_MCAST(pattrib->dst))) {
+	if ((!MacAddr_isBcst(pattrib->dst)) && (!IS_MCAST(pattrib->dst)))
 		padapter->mlmepriv.LinkDetectInfo.NumRxUnicastOkInPeriod++;
-	}
 
 	if (sta)
 		psta = sta;
@@ -1033,9 +1032,8 @@ sint sta2ap_data_frame(struct adapter *adapter, union recv_frame *precv_frame,
 
 		process_pwrbit_data(adapter, precv_frame);
 
-		if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE) {
+		if ((GetFrameSubType(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE)
 			process_wmmps_data(adapter, precv_frame);
-		}
 
 		if (GetFrameSubType(ptr) & BIT(6)) {
 			/* No data, will not indicate to upper layer, temporily count it here */
@@ -1596,9 +1594,8 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe)
 	u8 *ptr = get_recvframe_data(precvframe) ; /*  point to frame_ctrl field */
 	struct rx_pkt_attrib *pattrib = &precvframe->u.hdr.attrib;
 
-	if (pattrib->encrypt) {
+	if (pattrib->encrypt)
 		recvframe_pull_tail(precvframe, pattrib->icv_len);
-	}
 
 	psnap = (struct ieee80211_snap_hdr	*)(ptr+pattrib->hdrlen + pattrib->iv_len);
 	psnap_type = ptr+pattrib->hdrlen + pattrib->iv_len+SNAP_SIZE;
@@ -1916,9 +1913,8 @@ static int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe)
 		a_len -= nSubframe_Length;
 		if (a_len != 0) {
 			padding_len = 4 - ((nSubframe_Length + ETH_HLEN) & (4-1));
-			if (padding_len == 4) {
+			if (padding_len == 4)
 				padding_len = 0;
-			}
 
 			if (a_len < padding_len) {
 				DBG_871X("ParseSubframe(): a_len < padding_len !\n");
@@ -1933,9 +1929,8 @@ static int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe)
 		sub_pkt = subframes[i];
 
 		/* Indicate the packets to upper layer */
-		if (sub_pkt) {
+		if (sub_pkt)
 			rtw_os_recv_indicate_pkt(padapter, sub_pkt, &prframe->u.hdr.attrib);
-		}
 	}
 
 	prframe->u.hdr.len = 0;
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2020-12-05 23:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-05 23:21 [PATCH 0/2] Fix coding style issues Brother Matthew De Angelis
2020-12-05 23:23 ` [PATCH 1/2] Staging: rtl8723bs/core: delete empty if statement Brother Matthew De Angelis
2020-12-05 23:26 ` [PATCH 2/2] Staging: rtl8723bs/core: fix brace coding style issue Brother Matthew De Angelis

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).