LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] staging: rtl8712: clean up style issues
@ 2021-04-06  2:32 Deborah Brouwer
  2021-04-06  2:32 ` [PATCH 1/4] staging: rtl8712: add period within a comment Deborah Brouwer
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Deborah Brouwer @ 2021-04-06  2:32 UTC (permalink / raw)
  To: Larry.Finger, florian.c.schilhabel, gregkh
  Cc: linux-staging, linux-kernel, outreachy-kernel, Deborah Brouwer

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


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

* [PATCH 1/4] staging: rtl8712: add period within a comment
  2021-04-06  2:32 [PATCH 0/4] staging: rtl8712: clean up style issues Deborah Brouwer
@ 2021-04-06  2:32 ` Deborah Brouwer
  2021-04-06  2:32 ` [PATCH 2/4] staging: rtl8712: remove a blank line Deborah Brouwer
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Deborah Brouwer @ 2021-04-06  2:32 UTC (permalink / raw)
  To: Larry.Finger, florian.c.schilhabel, gregkh
  Cc: linux-staging, linux-kernel, outreachy-kernel, Deborah Brouwer

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

Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
---
 drivers/staging/rtl8712/rtl8712_xmit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8712_xmit.c
index c247f92207f5..d8a366338a2b 100644
--- a/drivers/staging/rtl8712/rtl8712_xmit.c
+++ b/drivers/staging/rtl8712/rtl8712_xmit.c
@@ -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,
-- 
2.17.1


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

* [PATCH 2/4] staging: rtl8712: remove a blank line
  2021-04-06  2:32 [PATCH 0/4] staging: rtl8712: clean up style issues Deborah Brouwer
  2021-04-06  2:32 ` [PATCH 1/4] staging: rtl8712: add period within a comment Deborah Brouwer
@ 2021-04-06  2:32 ` Deborah Brouwer
  2021-04-06  2:32 ` [PATCH 3/4] staging: rtl8712: remove space after cast Deborah Brouwer
  2021-04-06  2:32 ` [PATCH 4/4] staging: rtl8712: add space before binary operator Deborah Brouwer
  3 siblings, 0 replies; 6+ messages in thread
From: Deborah Brouwer @ 2021-04-06  2:32 UTC (permalink / raw)
  To: Larry.Finger, florian.c.schilhabel, gregkh
  Cc: linux-staging, linux-kernel, outreachy-kernel, Deborah Brouwer

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

Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
---
 drivers/staging/rtl8712/rtl8712_xmit.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8712_xmit.c
index d8a366338a2b..4be81c2546fe 100644
--- a/drivers/staging/rtl8712/rtl8712_xmit.c
+++ b/drivers/staging/rtl8712/rtl8712_xmit.c
@@ -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)
 {
-- 
2.17.1


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

* [PATCH 3/4] staging: rtl8712: remove space after cast
  2021-04-06  2:32 [PATCH 0/4] staging: rtl8712: clean up style issues Deborah Brouwer
  2021-04-06  2:32 ` [PATCH 1/4] staging: rtl8712: add period within a comment Deborah Brouwer
  2021-04-06  2:32 ` [PATCH 2/4] staging: rtl8712: remove a blank line Deborah Brouwer
@ 2021-04-06  2:32 ` Deborah Brouwer
  2021-04-13 12:56   ` Dan Carpenter
  2021-04-06  2:32 ` [PATCH 4/4] staging: rtl8712: add space before binary operator Deborah Brouwer
  3 siblings, 1 reply; 6+ messages in thread
From: Deborah Brouwer @ 2021-04-06  2:32 UTC (permalink / raw)
  To: Larry.Finger, florian.c.schilhabel, gregkh
  Cc: linux-staging, linux-kernel, outreachy-kernel, Deborah Brouwer

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

Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
---
 drivers/staging/rtl8712/rtl8712_xmit.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8712_xmit.c
index 4be81c2546fe..ad9ea05504db 100644
--- a/drivers/staging/rtl8712/rtl8712_xmit.c
+++ b/drivers/staging/rtl8712/rtl8712_xmit.c
@@ -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);
-- 
2.17.1


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

* [PATCH 4/4] staging: rtl8712: add space before binary operator
  2021-04-06  2:32 [PATCH 0/4] staging: rtl8712: clean up style issues Deborah Brouwer
                   ` (2 preceding siblings ...)
  2021-04-06  2:32 ` [PATCH 3/4] staging: rtl8712: remove space after cast Deborah Brouwer
@ 2021-04-06  2:32 ` Deborah Brouwer
  3 siblings, 0 replies; 6+ messages in thread
From: Deborah Brouwer @ 2021-04-06  2:32 UTC (permalink / raw)
  To: Larry.Finger, florian.c.schilhabel, gregkh
  Cc: linux-staging, linux-kernel, outreachy-kernel, Deborah Brouwer

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

Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
---
 drivers/staging/rtl8712/rtl8712_xmit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8712_xmit.c
index ad9ea05504db..116cb812dcb9 100644
--- a/drivers/staging/rtl8712/rtl8712_xmit.c
+++ b/drivers/staging/rtl8712/rtl8712_xmit.c
@@ -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;
-- 
2.17.1


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

* Re: [PATCH 3/4] staging: rtl8712: remove space after cast
  2021-04-06  2:32 ` [PATCH 3/4] staging: rtl8712: remove space after cast Deborah Brouwer
@ 2021-04-13 12:56   ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2021-04-13 12:56 UTC (permalink / raw)
  To: Deborah Brouwer
  Cc: Larry.Finger, florian.c.schilhabel, gregkh, linux-staging,
	linux-kernel, outreachy-kernel

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

regards,
dan carpenter


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

end of thread, other threads:[~2021-04-13 12:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06  2:32 [PATCH 0/4] staging: rtl8712: clean up style issues Deborah Brouwer
2021-04-06  2:32 ` [PATCH 1/4] staging: rtl8712: add period within a comment Deborah Brouwer
2021-04-06  2:32 ` [PATCH 2/4] staging: rtl8712: remove a blank line Deborah Brouwer
2021-04-06  2:32 ` [PATCH 3/4] staging: rtl8712: remove space after cast Deborah Brouwer
2021-04-13 12:56   ` Dan Carpenter
2021-04-06  2:32 ` [PATCH 4/4] staging: rtl8712: add space before binary operator Deborah Brouwer

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 read-only IMAP folder(s) and NNTP newsgroup(s).