Skip to contentSkip to conversation

staging: rtl8712: clean up style issues

PATCH In review Deborah Brouwer 2 participants 6 messages Apr 6, 2021 – Apr 13, 2021 Staging

lore
Share & tools
lore
#0 lore raw

cover staging: rtl8712: clean up style issues

These patches make changes to clean up style issues identified by checkpatch.

Deborah Brouwer (4):
staging: rtl8712: add period within a comment
staging: rtl8712: remove a blank line
staging: rtl8712: remove space after cast
staging: rtl8712: add space before binary operator

 drivers/staging/rtl8712/rtl8712_xmit.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

--
2.17.1

#1 lore raw

PATCH 1/4 staging: rtl8712: add period within a comment

Add a period to separate repeated words in a comment. The period preserves the meaning of the comment while also stopping the checkpatch warning:
WARNING: Possible repeated word: 'fw'.

---
 drivers/staging/rtl8712/rtl8712_xmit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8712/rtl8712_xmit.c +2 -2
index c247f92207f5..d8a366338a2b 100644
@@ -507,7 +507,7 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
 
 		/*offset 12*/
 		/* f/w will increase the seqnum by itself, driver pass the
-		 * correct priority to fw
+		 * correct priority to fw.
 		 * fw will check the correct priority for increasing the
 		 * seqnum per tid. about usb using 4-endpoint, qsel points out
 		 * the correct mapping between AC&Endpoint,
@@ -560,7 +560,7 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
 			ptxdesc->txdw2 |= cpu_to_le32(BMC);
 		/* offset 12 */
 		/* f/w will increase the seqnum by itself, driver pass the
-		 * correct priority to fw
+		 * correct priority to fw.
 		 * fw will check the correct priority for increasing the seqnum
 		 * per tid. about usb using 4-endpoint, qsel points out the
 		 * correct mapping between AC&Endpoint,
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/4 staging: rtl8712: remove a blank line

In reply to Deborah Brouwer

A duplicate blank line is removed so that only a single blank line separates two functions. Identified by checkpatch.

---
 drivers/staging/rtl8712/rtl8712_xmit.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/rtl8712/rtl8712_xmit.c +0 -1
index d8a366338a2b..4be81c2546fe 100644
@@ -317,7 +317,6 @@ void r8712_append_mpdu_unit(struct xmit_buf *pxmitbuf,
 			 0x0000ffff)));
 }
 
-
 void r8712_xmitframe_aggr_1st(struct xmit_buf *pxmitbuf,
 			      struct xmit_frame *pxmitframe)
 {
Signature · 1 line
2.17.1
#3 lore raw

PATCH 3/4 staging: rtl8712: remove space after cast

In reply to Deborah Brouwer

Remove the unnecessary space immediately after a cast. Identified by
checkpatch: CHECK: No space is necessary after a cast.

---
 drivers/staging/rtl8712/rtl8712_xmit.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8712/rtl8712_xmit.c +3 -3
index 4be81c2546fe..ad9ea05504db 100644
@@ -228,9 +228,9 @@ void r8712_do_queue_select(struct _adapter *padapter,
 	struct dvobj_priv *pdvobj = &padapter->dvobjpriv;
 
 	if (pdvobj->nr_endpoint == 6) {
-		qsel = (unsigned int) pattrib->priority;
+		qsel = (unsigned int)pattrib->priority;
 	} else if (pdvobj->nr_endpoint == 4) {
-		qsel = (unsigned int) pattrib->priority;
+		qsel = (unsigned int)pattrib->priority;
 		if (qsel == 0 || qsel == 3)
 			qsel = 3;
 		else if (qsel == 1 || qsel == 2)
@@ -359,7 +359,7 @@ void r8712_dump_aggr_xframe(struct xmit_buf *pxmitbuf,
 	struct tx_desc *ptxdesc = pxmitbuf->pbuf;
 	struct cmd_hdr *pcmd_hdr = (struct cmd_hdr *)
 		(pxmitbuf->pbuf + TXDESC_SIZE);
-	u16 total_length = (u16) (ptxdesc->txdw0 & 0xffff);
+	u16 total_length = (u16)(ptxdesc->txdw0 & 0xffff);
 
 	/* use 1st xmitframe as media */
 	xmitframe_xmitbuf_attach(pxmitframe, pxmitbuf);
Signature · 1 line
2.17.1
#5 lore raw

PATCH 4/4 staging: rtl8712: add space before binary operator

In reply to Deborah Brouwer

Add a space before the binary operator "|" to comply with kernel coding style. Identified by checkpatch.

---
 drivers/staging/rtl8712/rtl8712_xmit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8712/rtl8712_xmit.c +1 -1
index ad9ea05504db..116cb812dcb9 100644
@@ -368,7 +368,7 @@ void r8712_dump_aggr_xframe(struct xmit_buf *pxmitbuf,
 							0xffff0000));
 
 	/* urb length in cmd_dw1 */
-	pcmd_hdr->cmd_dw1 = cpu_to_le32((pxmitbuf->aggr_nr & 0xff)|
+	pcmd_hdr->cmd_dw1 = cpu_to_le32((pxmitbuf->aggr_nr & 0xff) |
 					((total_length + TXDESC_SIZE) << 16));
 	pxmitframe->last[0] = 1;
 	pxmitframe->bpending[0] = false;
Signature · 1 line
2.17.1
#4 lore raw

Re: [PATCH 3/4] staging: rtl8712: remove space after cast

In reply to Deborah Brouwer

This patch has already been applied, which is fine, but really all these casts are totally pointless and should be removed.

regards,
dan carpenter