Re: [PATCH 1/2] staging: rtl8723bs: Remove dead code
From: Greg Kroah-Hartman
Date: Mon Mar 30 2026 - 13:42:56 EST
On Mon, Mar 30, 2026 at 11:55:09AM -0500, Ethan Tidmore wrote:
> Remove commented out code and remove if statement with no body but a
> line of commented out code.
>
> Signed-off-by: Ethan Tidmore <ethantidmore06@xxxxxxxxx>
> ---
> drivers/staging/rtl8723bs/core/rtw_ap.c | 83 +++----------------------
> 1 file changed, 7 insertions(+), 76 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
> index 4b4012411011..3327519dd729 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_ap.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
> @@ -20,8 +20,6 @@ void init_mlme_ap_info(struct adapter *padapter)
> INIT_LIST_HEAD(&pacl_list->acl_node_q.queue);
> spin_lock_init(&pacl_list->acl_node_q.lock);
>
> - /* pmlmeext->bstart_bss = false; */
> -
> start_ap_mode(padapter);
> }
>
> @@ -32,8 +30,6 @@ void free_mlme_ap_info(struct adapter *padapter)
> struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
> struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
>
> - /* stop_ap_mode(padapter); */
> -
> pmlmepriv->update_bcn = false;
> pmlmeext->bstart_bss = false;
>
> @@ -377,7 +373,6 @@ void update_bmc_sta(struct adapter *padapter)
>
> if (psta) {
> psta->aid = 0;/* default set to 0 */
> - /* psta->mac_id = psta->aid+4; */
> psta->mac_id = psta->aid + 1;/* mac_id = 1 for bc/mc stainfo */
>
> pmlmeinfo->FW_sta_info[psta->mac_id].psta = psta;
> @@ -413,17 +408,14 @@ void update_bmc_sta(struct adapter *padapter)
> /* ap mode */
> rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, true);
>
> - /* if (pHalData->fw_ractrl == true) */
> - {
> - u8 arg[4] = {0};
> + u8 arg[4] = {0};
Um, are you sure about this?
That's normally not a good thing for kernel code to look like (i.e.
putting new variable declarations in the middle of the function.
Please be more careful.
thanks,
greg k-h