public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Omer El Idrissi <omer.e.idrissi@gmail.com>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: replace magic -2 error codes with proper errno
Date: Tue, 27 Jan 2026 15:43:34 +0100	[thread overview]
Message-ID: <2026012719-coerce-lark-192c@gregkh> (raw)
In-Reply-To: <20260125221219.26151-1-omer.e.idrissi@gmail.com>

On Sun, Jan 25, 2026 at 11:12:18PM +0100, Omer El Idrissi wrote:
> In xmit_xmitframes function:
> - Hardware busy condition previously
> returned -2; changed to -EBUSY
> - Transmit buffer allocation failure previously
> returned -2; changed to ENOBUFS
> 
> The caller checks both errors and handles retry logic.This improves
> readability and conforms to kernel error-handling
> conventions.
> 
> Signed-off-by: Omer El Idrissi <omer.e.idrissi@gmail.com>
> ---
>  drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> index abb6fdfe7e1f..d1a427b2ef7f 100644
> --- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> +++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> @@ -205,7 +205,7 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv
>  			(padapter->mlmepriv.LinkDetectInfo.bHigherBusyTxTraffic)
>  		) {
>  			if ((phwxmit->accnt > 0) && (phwxmit->accnt < 5)) {
> -				err = -2;
> +				err = -EBUSY; // supposed to return -EBUSY for these conditions???

Why is this comment added?  Who is going to answer that?

thanks,

greg k-h

  reply	other threads:[~2026-01-27 14:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-25 22:12 [PATCH] staging: rtl8723bs: replace magic -2 error codes with proper errno Omer El Idrissi
2026-01-27 14:43 ` Greg KH [this message]
2026-01-28 17:21 ` [PATCH v2] " Omer El Idrissi
2026-01-29  7:27   ` Dan Carpenter
2026-01-29 17:26     ` Omer El Idrissi

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=2026012719-coerce-lark-192c@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=omer.e.idrissi@gmail.com \
    /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