All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Fix styling issues and remove unused code in rtl8723bs
@ 2021-12-22 18:51 Ismayil Mirzali
  2021-12-22 18:51 ` [PATCH v3 1/2] staging: rtl8723bs: address style guide warnings Ismayil Mirzali
  2021-12-22 18:51 ` [PATCH v3 2/2] staging: rtl8723bs: removed unused if blocks Ismayil Mirzali
  0 siblings, 2 replies; 5+ messages in thread
From: Ismayil Mirzali @ 2021-12-22 18:51 UTC (permalink / raw)
  To: linux-staging; +Cc: gregkh, fabioaiuto83, linux, paskripkin

This patchset splits my previous changes into individual patches to
better conform to the contributing guidelines. I addressed issues with
extra whitespaces, wrongly formatted if blocks, fixed order of variables
in if comparisons and deleted the unused parts of the code as suggested
by Pavel Skripkin <paskripkin@gmail.com>. Apologies for the previous
mistakes.

Ismayil Mirzali (2):
  staging: rtl8723bs: address style guide warnings
  staging: rtl8723bs: removed unused if blocks

 .../staging/rtl8723bs/hal/rtl8723bs_xmit.c    | 21 +++++++------------
 1 file changed, 7 insertions(+), 14 deletions(-)

-- 
2.25.1


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

* [PATCH v3 1/2] staging: rtl8723bs: address style guide warnings
  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
  2021-12-23  7:25   ` 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
  1 sibling, 2 replies; 5+ messages in thread
From: Ismayil Mirzali @ 2021-12-22 18:51 UTC (permalink / raw)
  To: linux-staging; +Cc: gregkh, fabioaiuto83, linux, paskripkin

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


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

* [PATCH v3 2/2] staging: rtl8723bs: removed unused if blocks
  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 ` [PATCH v3 1/2] staging: rtl8723bs: address style guide warnings Ismayil Mirzali
@ 2021-12-22 18:51 ` Ismayil Mirzali
  1 sibling, 0 replies; 5+ messages in thread
From: Ismayil Mirzali @ 2021-12-22 18:51 UTC (permalink / raw)
  To: linux-staging; +Cc: gregkh, fabioaiuto83, linux, paskripkin

Deleted the commented if blocks that weren't being used as suggested by
the maintainers.

Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com>
---
Changes in v3:
  - None, this patch was created to separate out the unrelated changes
    of the first patch

 drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
index d235d1f5f80e..8270c022e2cc 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
@@ -31,9 +31,6 @@ static u8 rtw_sdio_wait_enough_TxOQT_space(struct adapter *padapter, u8 agg_num)
 
 	pHalData->SdioTxOQTFreeSpace -= agg_num;
 
-	/* if (n > 1) */
-	/* 	++priv->pshare->nr_out_of_txoqt_space; */
-
 	return true;
 }
 
@@ -310,8 +307,6 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv
 					txlen = txdesc_size + pxmitframe->attrib.last_txcmdsz;
 					pxmitframe->pg_num = (txlen + 127) / 128;
 					pxmitbuf->pg_num += (txlen + 127) / 128;
-				    /* if (k != 1) */
-					/* 	((struct xmit_frame*)pxmitbuf->priv_data)->pg_num += pxmitframe->pg_num; */
 					pxmitbuf->ptail += _RND(txlen, 8); /*  round to 8 bytes alignment */
 					pxmitbuf->len = _RND(pxmitbuf->len, 8) + txlen;
 				}
-- 
2.25.1


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

* Re: [PATCH v3 1/2] staging: rtl8723bs: address style guide warnings
  2021-12-22 18:51 ` [PATCH v3 1/2] staging: rtl8723bs: address style guide warnings Ismayil Mirzali
@ 2021-12-23  7:25   ` Greg KH
  2022-01-05 14:47   ` Dan Carpenter
  1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2021-12-23  7:25 UTC (permalink / raw)
  To: Ismayil Mirzali; +Cc: linux-staging, fabioaiuto83, linux, paskripkin

On Wed, Dec 22, 2021 at 08:51:14PM +0200, Ismayil Mirzali wrote:
> Fixed mistakes regarding wrongly formatted if statements,
> added missing lines after declarations and removed unnecessary
> whitespace.

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did many different things all at once, making it difficult
  to review.  All Linux kernel patches need to only do one thing at a
  time.  If you need to do multiple things (such as clean up all coding
  style issues in a file/driver), do it in a sequence of patches, each
  one doing only one thing.  This will make it easier to review the
  patches to ensure that they are correct, and to help alleviate any
  merge issues that larger patches can cause.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

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

* Re: [PATCH v3 1/2] staging: rtl8723bs: address style guide warnings
  2021-12-22 18:51 ` [PATCH v3 1/2] staging: rtl8723bs: address style guide warnings Ismayil Mirzali
  2021-12-23  7:25   ` Greg KH
@ 2022-01-05 14:47   ` Dan Carpenter
  1 sibling, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2022-01-05 14:47 UTC (permalink / raw)
  To: Ismayil Mirzali; +Cc: linux-staging, gregkh, fabioaiuto83, linux, paskripkin

On Wed, Dec 22, 2021 at 08:51:14PM +0200, Ismayil Mirzali wrote:
> @@ -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;

Separate patches.

> @@ -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);

Separate patch.

>  
>  	complete(&pxmitpriv->SdioXmitTerminate);

regards,
dan carpenter

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

end of thread, other threads:[~2022-01-05 14:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH v3 1/2] staging: rtl8723bs: address style guide warnings Ismayil Mirzali
2021-12-23  7:25   ` 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

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.