[PATCH] staging: rtl8723bs: remove dead code in rtw_mlme_ext.c

Fu Zang posted 1 patch 1 week ago
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 8 --------
1 file changed, 8 deletions(-)
[PATCH] staging: rtl8723bs: remove dead code in rtw_mlme_ext.c
Posted by Fu Zang 1 week ago
This patch removes a block of code guarded by if (0).
It appears to be leftover debug code that manually prints
packet hex dumps.

The kernel has standard facilities for hex dumps (print_hex_dump),
and keeping dead code with manual loops serves no purpose.

Signed-off-by: Fu Zang <t1468150755@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index ac49bfbaa5bb..0700d4318cd8 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -1865,14 +1865,6 @@ unsigned int OnAction_sa_query(struct adapter *padapter, union recv_frame *precv
 	default:
 		break;
 	}
-	if (0) {
-		int pp;
-
-		netdev_dbg(padapter->pnetdev, "pattrib->pktlen = %d =>", pattrib->pkt_len);
-		for (pp = 0; pp < pattrib->pkt_len; pp++)
-			pr_cont(" %02x ", pframe[pp]);
-		pr_cont("\n");
-	}
 
 	return _SUCCESS;
 }
-- 
2.43.0
Re: [PATCH] staging: rtl8723bs: remove dead code in rtw_mlme_ext.c
Posted by Greg KH an hour ago
On Sat, Jan 31, 2026 at 03:15:07PM +0800, Fu Zang wrote:
> This patch removes a block of code guarded by if (0).
> It appears to be leftover debug code that manually prints
> packet hex dumps.
> 
> The kernel has standard facilities for hex dumps (print_hex_dump),
> and keeping dead code with manual loops serves no purpose.
> 
> Signed-off-by: Fu Zang <t1468150755@gmail.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> index ac49bfbaa5bb..0700d4318cd8 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> @@ -1865,14 +1865,6 @@ unsigned int OnAction_sa_query(struct adapter *padapter, union recv_frame *precv
>  	default:
>  		break;
>  	}
> -	if (0) {
> -		int pp;
> -
> -		netdev_dbg(padapter->pnetdev, "pattrib->pktlen = %d =>", pattrib->pkt_len);
> -		for (pp = 0; pp < pattrib->pkt_len; pp++)
> -			pr_cont(" %02x ", pframe[pp]);
> -		pr_cont("\n");
> -	}
>  
>  	return _SUCCESS;
>  }
> -- 
> 2.43.0
> 
 

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 not apply to any known trees that Greg is in control
  of.  Possibly this is because you made it against Linus's tree, not
  the linux-next tree, which is where all of the development for the
  next version of the kernel is at.  Please refresh your patch against
  the linux-next tree, or even better yet, the development tree
  specified in the MAINTAINERS file for the subsystem you are submitting
  a patch for, and resend it.

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