Skip to contentSkip to conversation

staging: rtl8723bs: os_dep: Correct typos and long line in comments

PATCH In review R Veera Kumar 2 participants 4 messages Mar 19, 2020 Staging

lore
Share & tools
lore
#0 lore raw

v2 cover staging: rtl8723bs: os_dep: Correct typos and long line in comments

Correct typos in comments found using checkpatch.pl.

Correct long line comments to match coding style of respecting 80 character per line limit.

Changes since V1
- Missed staging: rtl8723bs: os_dep: in cover letter
- Patch 2/2 corrects a extra blank line addition
---
R Veera Kumar (2):
staging: rtl8723bs: os_dep: Correct typo in comments
staging: rtl8723bs: os_dep: Correct long line comments

 .../staging/rtl8723bs/os_dep/osdep_service.c  |  2 +-
 drivers/staging/rtl8723bs/os_dep/recv_linux.c | 28 ++++++++++++++-----
 2 files changed, 22 insertions(+), 8 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/2 staging: rtl8723bs: os_dep: Correct typo in comments

Correct typo in two comments.
Misspelling found using checkpatch.pl.

---
 drivers/staging/rtl8723bs/os_dep/osdep_service.c | 2 +-
 drivers/staging/rtl8723bs/os_dep/recv_linux.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/os_dep/osdep_service.c +1 -1
index f5614e56371e..4238209ec175 100644
@@ -289,7 +289,7 @@ void *rtw_cbuf_pop(struct rtw_cbuf *cbuf)
 }
 
 /**
- * rtw_cbuf_alloc - allocte a rtw_cbuf with given size and do initialization
+ * rtw_cbuf_alloc - allocate a rtw_cbuf with given size and do initialization
  * @size: size of pointer
  *
  * Returns: pointer of srtuct rtw_cbuf, NULL for allocation failure
drivers/staging/rtl8723bs/os_dep/recv_linux.c +1 -1
index 22059bbbed9d..a6491f163272 100644
@@ -101,7 +101,7 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, _pkt *pkt, struct rx_pkt
 	struct mlme_priv*pmlmepriv = &padapter->mlmepriv;
 	int ret;
 
-	/* Indicat the packets to upper layer */
+	/* Indicate the packets to upper layer */
 	if (pkt) {
 		if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
 			_pkt *pskb2 = NULL;
Signature · 1 line
2.20.1
#2 lore raw

PATCH v2 2/2 staging: rtl8723bs: os_dep: Correct long line comments

In reply to R Veera Kumar

Correct long line comments to respect 80 character per line limit.

---
Changes in v2:
- Remove an extra blank line added by error

---
 drivers/staging/rtl8723bs/os_dep/recv_linux.c | 26 ++++++++++++++-----
 1 file changed, 20 insertions(+), 6 deletions(-)
drivers/staging/rtl8723bs/os_dep/recv_linux.c +20 -6
index a6491f163272..35241c0493d2 100644
@@ -35,7 +35,8 @@ void rtw_os_recv_resource_free(struct recv_priv *precvpriv)
 
 	for (i = 0; i < NR_RECVFRAME; i++) {
 		if (precvframe->u.hdr.pkt) {
-			dev_kfree_skb_any(precvframe->u.hdr.pkt);/* free skb by driver */
+			/* free skb by driver */
+			dev_kfree_skb_any(precvframe->u.hdr.pkt);
 			precvframe->u.hdr.pkt = NULL;
 		}
 		precvframe++;
@@ -80,7 +81,10 @@ _pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_Length, u8
 		((!memcmp(sub_skb->data, rtw_rfc1042_header, SNAP_SIZE) &&
 		  eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) ||
 		 !memcmp(sub_skb->data, rtw_bridge_tunnel_header, SNAP_SIZE))) {
-		/* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */
+		/*
+		 * remove RFC1042 or Bridge-Tunnel encapsulation and replace
+		 * EtherType
+		 */
 		skb_pull(sub_skb, SNAP_SIZE);
 		memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->src, ETH_ALEN);
 		memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->dst, ETH_ALEN);
@@ -112,7 +116,10 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, _pkt *pkt, struct rx_pkt
 			/* DBG_871X("bmcast =%d\n", bmcast); */
 
 			if (memcmp(pattrib->dst, myid(&padapter->eeprompriv), ETH_ALEN)) {
-				/* DBG_871X("not ap psta =%p, addr =%pM\n", psta, pattrib->dst); */
+				/*
+				 *  DBG_871X("not ap psta =%p, addr =%pM\n",
+				 *  psta, pattrib->dst);
+				 */
 
 				if (bmcast) {
 					psta = rtw_get_bcmc_stainfo(padapter);
@@ -124,7 +131,10 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, _pkt *pkt, struct rx_pkt
 				if (psta) {
 					struct net_device *pnetdev = (struct net_device*)padapter->pnetdev;
 
-					/* DBG_871X("directly forwarding to the rtw_xmit_entry\n"); */
+					/*
+					 * DBG_871X("directly forwarding to the
+					 * rtw_xmit_entry\n");
+					 */
 
 					/* skb->ip_summed = CHECKSUM_NONE; */
 					pkt->dev = pnetdev;
@@ -236,7 +246,10 @@ static void rtw_os_ksocket_send(struct adapter *padapter, union recv_frame *prec
 			u16 len = *(u16*)(skb->data+ETH_HLEN+2);
 			/* u16 ctrl_type = *(u16*)(skb->data+ETH_HLEN+4); */
 
-			/* DBG_871X("eth, RC: len = 0x%x, ctrl_type = 0x%x\n", len, ctrl_type); */
+			/*
+			 * DBG_871X("eth, RC: len = 0x%x, ctrl_type = 0x%x\n",
+			 * len, ctrl_type);
+			 */
 			DBG_871X("eth, RC: len = 0x%x\n", len);
 
 			for (i = 0; i < len; i++)
@@ -291,7 +304,8 @@ int rtw_recv_indicatepkt(struct adapter *padapter, union recv_frame *precv_frame
 
 	rtw_os_recv_indicate_pkt(padapter, skb, pattrib);
 
-	precv_frame->u.hdr.pkt = NULL; /*  pointers to NULL before rtw_free_recvframe() */
+	/*  pointers to NULL before rtw_free_recvframe() */
+	precv_frame->u.hdr.pkt = NULL;
 
 	rtw_free_recvframe(precv_frame, pfree_recv_queue);
 
Signature · 1 line
2.20.1
#3 lore raw

Re: [PATCH v2 2/2] staging: rtl8723bs: os_dep: Correct long line comments

Quoted 38 lines · R Veera Kumar

Correct long line comments to respect 80 character per line limit.

---
Changes in v2:
- Remove an extra blank line added by error

---
 drivers/staging/rtl8723bs/os_dep/recv_linux.c | 26 ++++++++++++++-----
 1 file changed, 20 insertions(+), 6 deletions(-)
drivers/staging/rtl8723bs/os_dep/recv_linux.c +6 -2
index a6491f163272..35241c0493d2 100644
@@ -35,7 +35,8 @@ void rtw_os_recv_resource_free(struct recv_priv *precvpriv)
 
 	for (i = 0; i < NR_RECVFRAME; i++) {
 		if (precvframe->u.hdr.pkt) {
-			dev_kfree_skb_any(precvframe->u.hdr.pkt);/* free skb by driver */
+			/* free skb by driver */
+			dev_kfree_skb_any(precvframe->u.hdr.pkt);
 			precvframe->u.hdr.pkt = NULL;
 		}
 		precvframe++;
@@ -80,7 +81,10 @@ _pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_Length, u8
 		((!memcmp(sub_skb->data, rtw_rfc1042_header, SNAP_SIZE) &&
 		  eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) ||
 		 !memcmp(sub_skb->data, rtw_bridge_tunnel_header, SNAP_SIZE))) {
-		/* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */
+		/*
+		 * remove RFC1042 or Bridge-Tunnel encapsulation and replace
+		 * EtherType
+		 */
 		skb_pull(sub_skb, SNAP_SIZE);
 		memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->src, ETH_ALEN);
 		memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->dst, ETH_ALEN);

drivers/staging/rtl8723bs/os_dep/recv_linux.c void rtw_os_recv_indicate_pkt(struct adapter *padapter, _pkt *pkt, struct rx_pkt · line 122

Quoted 8 lines
drivers/staging/rtl8723bs/os_dep/recv_linux.c +4 -1
@@ -112,7 +116,10 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, _pkt *pkt, struct rx_pkt
 			/* DBG_871X("bmcast =%d\n", bmcast); */
 
 			if (memcmp(pattrib->dst, myid(&padapter->eeprompriv), ETH_ALEN)) {
-				/* DBG_871X("not ap psta =%p, addr =%pM\n", psta, pattrib->dst); */
+				/*
+				 *  DBG_871X("not ap psta =%p, addr =%pM\n",
+				 *  psta, pattrib->dst);
+				 */

Why the extra ' ' character before the comment?

And that was a code line, not a comment line, it should just be removed entirely. But as a separate patch please.

thanks,

greg k-h