Re: [PATCH v5 1/3] rtl8723bs: io: Add independent rtw_check_continual_io_error function
From: Dan Carpenter
Date: Mon Jan 12 2026 - 02:55:47 EST
On Sun, Jan 11, 2026 at 11:21:34AM +0800, 2023060904@xxxxxxxxxx wrote:
> diff --git a/drivers/staging/rtl8723bs/core/rtw_io.c b/drivers/staging/rtl8723bs/core/rtw_io.c
> index 0f52710e6d3a..cd455cfcf046 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_io.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_io.c
> @@ -132,19 +132,7 @@ int rtw_init_io_priv(struct adapter *padapter, void (*set_intf_ops)(struct adapt
> return _SUCCESS;
> }
>
> -/*
> - * Increase and check if the continual_io_error of this @param dvobjprive is larger than MAX_CONTINUAL_IO_ERR
> - * @return true:
> - * @return false:
> - */
> -int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj)
> -{
> - dvobj->continual_io_error++;
> - return (dvobj->continual_io_error > MAX_CONTINUAL_IO_ERR);
> -}
> -
> -/* Set the continual_io_error of this @param dvobjprive to 0 */
> -void rtw_reset_continual_io_error(struct dvobj_priv *dvobj)
> +bool rtw_check_continual_io_error(int error_count)
> {
> - dvobj->continual_io_error = 0;
> + return (error_count > MAX_CONTINUAL_IO_ERR) ? true : false;
> }
You've broken this patch up in the wrong way. This patch removes
the dvobj->continual_io_error++ and then the later patches remove
the code which uses it. This introduces a bug and then fixes it
later. You can't introduce bugs even when they are fixed later in
the patchset.
Also I don't really know why you are doing this. Have you tested
your code? I don't really know why they wrote it like this
originally, but it wouldn't surpise me if they did it based on
testing.
regards,
dan carpenter