public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: 2023060904@ycu.edu.cn
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org, guagua210311@qq.com
Subject: Re: [PATCH v5 1/3] rtl8723bs: io: Add independent rtw_check_continual_io_error function
Date: Mon, 12 Jan 2026 10:55:42 +0300	[thread overview]
Message-ID: <aWSo_vk5mK6Zbrj7@stanley.mountain> (raw)
In-Reply-To: <2048B07E5179CB78+20260111032136.7078-2-2023060904@ycu.edu.cn>

On Sun, Jan 11, 2026 at 11:21:34AM +0800, 2023060904@ycu.edu.cn 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


  parent reply	other threads:[~2026-01-12  7:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260111032136.7078-1-2023060904@ycu.edu.cn>
2026-01-11  3:21 ` [PATCH v5 1/3] rtl8723bs: io: Add independent rtw_check_continual_io_error function 2023060904
2026-01-11 13:04   ` Greg KH
2026-01-12  7:55   ` Dan Carpenter [this message]
2026-01-11  3:21 ` [PATCH v5 2/3] rtl8723bs: sdio: Use local error_count instead of global variable 2023060904
2026-01-11  3:21 ` [PATCH v5 3/3] rtl8723bs: io: Remove redundant global continual_io_error variable 2023060904

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aWSo_vk5mK6Zbrj7@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=2023060904@ycu.edu.cn \
    --cc=gregkh@linuxfoundation.org \
    --cc=guagua210311@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox