All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ismayil Mirzali <ismayilmirzeli@gmail.com>
To: linux-staging@lists.linux.dev
Cc: gregkh@linuxfoundation.org, fabioaiuto83@gmail.com,
	linux@roeck-us.net, paskripkin@gmail.com
Subject: [PATCH v3 1/2] staging: rtl8723bs: address style guide warnings
Date: Wed, 22 Dec 2021 20:51:14 +0200	[thread overview]
Message-ID: <3bddd2a8c02540c56a48d6844b3fcd897441803b.1640197297.git.ismayilmirzeli@gmail.com> (raw)
In-Reply-To: <cover.1640197297.git.ismayilmirzeli@gmail.com>

Fixed mistakes regarding wrongly formatted if statements,
added missing lines after declarations and removed unnecessary
whitespace.

Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com>
---
Changes in v3:
  - Improved commit message

 drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
index 7fe3df863fe1..d235d1f5f80e 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
@@ -147,9 +147,8 @@ s32 rtl8723bs_xmit_buf_handler(struct adapter *padapter)
 		return _SUCCESS;
 
 	ret = rtw_register_tx_alive(padapter);
-	if (ret != _SUCCESS) {
+	if (ret != _SUCCESS)
 		return _SUCCESS;
-	}
 
 	do {
 		queue_empty = rtl8723_dequeue_writeport(padapter);
@@ -247,6 +246,7 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv
 						if (pxmitbuf->len > 0 &&
 						    pxmitbuf->priv_data) {
 							struct xmit_frame *pframe;
+
 							pframe = (struct xmit_frame *)pxmitbuf->priv_data;
 							pframe->agg_num = k;
 							pxmitbuf->agg_num = k;
@@ -333,6 +333,7 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv
 		if (pxmitbuf) {
 			if (pxmitbuf->len > 0) {
 				struct xmit_frame *pframe;
+
 				pframe = (struct xmit_frame *)pxmitbuf->priv_data;
 				pframe->agg_num = k;
 				pxmitbuf->agg_num = k;
@@ -385,9 +386,8 @@ static s32 rtl8723bs_xmit_handler(struct adapter *padapter)
 	spin_lock_bh(&pxmitpriv->lock);
 	ret = rtw_txframes_pending(padapter);
 	spin_unlock_bh(&pxmitpriv->lock);
-	if (ret == 0) {
+	if (ret == 0)
 		return _SUCCESS;
-	}
 
 	/*  dequeue frame and write to hardware */
 
@@ -405,9 +405,8 @@ static s32 rtl8723bs_xmit_handler(struct adapter *padapter)
 	spin_lock_bh(&pxmitpriv->lock);
 	ret = rtw_txframes_pending(padapter);
 	spin_unlock_bh(&pxmitpriv->lock);
-	if (ret == 1) {
+	if (ret == 1)
 		goto next;
-	}
 
 	return _SUCCESS;
 }
@@ -428,10 +427,9 @@ int rtl8723bs_xmit_thread(void *context)
 
 	do {
 		ret = rtl8723bs_xmit_handler(padapter);
-		if (signal_pending(current)) {
+		if (signal_pending(current))
 			flush_signals(current);
-		}
-	} while (_SUCCESS == ret);
+	} while (ret == _SUCCESS);
 
 	complete(&pxmitpriv->SdioXmitTerminate);
 
-- 
2.25.1


  reply	other threads:[~2021-12-22 18:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22 18:51 [PATCH v3 0/2] Fix styling issues and remove unused code in rtl8723bs Ismayil Mirzali
2021-12-22 18:51 ` Ismayil Mirzali [this message]
2021-12-23  7:25   ` [PATCH v3 1/2] staging: rtl8723bs: address style guide warnings Greg KH
2022-01-05 14:47   ` Dan Carpenter
2021-12-22 18:51 ` [PATCH v3 2/2] staging: rtl8723bs: removed unused if blocks Ismayil Mirzali

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3bddd2a8c02540c56a48d6844b3fcd897441803b.1640197297.git.ismayilmirzeli@gmail.com \
    --to=ismayilmirzeli@gmail.com \
    --cc=fabioaiuto83@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=linux@roeck-us.net \
    --cc=paskripkin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.