[PATCH 2/9] staging: rtl8723bs: remove empty branches

Khushal Chitturi posted 9 patches 4 weeks ago
There is a newer version of this series
[PATCH 2/9] staging: rtl8723bs: remove empty branches
Posted by Khushal Chitturi 4 weeks ago
Remove empty else blocks in rtw_xmit.c to improve
readability and follow the kernel coding style.

Signed-off-by: Khushal Chitturi <khushalchitturi@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_xmit.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index b0d7e59e492d..cf7d92a85d6c 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -1707,8 +1707,6 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram
 		queue = &pxmitpriv->free_xmit_queue;
 	else if (pxmitframe->ext_tag == 1)
 		queue = &pxmitpriv->free_xframe_ext_queue;
-	else {
-	}
 
 	spin_lock_bh(&queue->lock);
 
@@ -1999,11 +1997,11 @@ inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe)
 		)
 			allow = true;
 
-	} else if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_ALL)
+	} else if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_ALL) {
 		allow = true;
-	else if (registry->hiq_filter == RTW_HIQ_FILTER_DENY_ALL) {
-	} else
+	} else {
 		rtw_warn_on(1);
+	}
 
 	return allow;
 }
-- 
2.52.0
Re: [PATCH 2/9] staging: rtl8723bs: remove empty branches
Posted by Dan Carpenter 3 weeks, 6 days ago
On Mon, Jan 12, 2026 at 12:06:23AM +0530, Khushal Chitturi wrote:
> Remove empty else blocks in rtw_xmit.c to improve
> readability and follow the kernel coding style.
> 
> Signed-off-by: Khushal Chitturi <khushalchitturi@gmail.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_xmit.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> index b0d7e59e492d..cf7d92a85d6c 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> @@ -1707,8 +1707,6 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram
>  		queue = &pxmitpriv->free_xmit_queue;
>  	else if (pxmitframe->ext_tag == 1)
>  		queue = &pxmitpriv->free_xframe_ext_queue;
> -	else {
> -	}
>  
>  	spin_lock_bh(&queue->lock);
>  
> @@ -1999,11 +1997,11 @@ inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe)
>  		)
>  			allow = true;
>  
> -	} else if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_ALL)
> +	} else if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_ALL) {
>  		allow = true;
> -	else if (registry->hiq_filter == RTW_HIQ_FILTER_DENY_ALL) {
> -	} else
> +	} else {
>  		rtw_warn_on(1);
> +	}

Please be more careful.  I'm not going to review the other patches.

regards,
dan carpenter