From: Greg KH <gregkh@linuxfoundation.org>
To: Akhmad <akhmad100913@gmail.com>
Cc: linux-staging@lists.linux.dev
Subject: Re: [PATCH] staging: rtl8723bs: replace yield() with cond_resched()
Date: Tue, 28 Jul 2026 09:34:25 +0200 [thread overview]
Message-ID: <2026072802-cherisher-broadband-342c@gregkh> (raw)
In-Reply-To: <20260725181837.39951-1-Akhmad100913@gmail.com>
On Sat, Jul 25, 2026 at 09:18:37PM +0300, Akhmad wrote:
> From: Akhmad Zubairugadzhiev <Akhmad100913@gmail.com>
>
> Replace deprecated yield() calls with cond_resched() in
> rtl8723b_hal_init.c. The yield() function is considered
> wrong practice in kernel code as it can lead to unexpected
> behavior. cond_resched() is the recommended replacement
> for conditional rescheduling in polling loops.
What "unexpected behavior" can happen here?
>
> Signed-off-by: Akhmad Zubairugadzhiev <Akhmad100913@gmail.com>
> ---
> drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
> index bcaf63b28..6fc3774d2 100644
> --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
> +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
> @@ -191,7 +191,7 @@ static s32 polling_fwdl_chksum(
> value32 = rtw_read32(adapter, REG_MCUFWDL);
> if (value32 & FWDL_ChkSum_rpt || adapter->bSurpriseRemoved || adapter->bDriverStopped)
> break;
> - yield();
> + cond_resched();
Are you sure this is correct?
thanks,
greg k-h
next prev parent reply other threads:[~2026-07-28 7:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-25 18:18 [PATCH] staging: rtl8723bs: replace yield() with cond_resched() Akhmad
2026-07-28 7:34 ` Greg KH [this message]
[not found] ` <CACCSLCqsJM81O1=zq-GrQEd625JBFOAoPHvqeYRJ35u4YD=mAw@mail.gmail.com>
2026-07-28 8:39 ` Greg KH
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=2026072802-cherisher-broadband-342c@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=akhmad100913@gmail.com \
--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