* [PATCH] staging: rtl8723bs: Replace yield() call with cond_resched()
@ 2018-03-19 22:11 ` Thomas Avery
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Avery @ 2018-03-19 22:11 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, kernel-janitors
Remove yield() call. yield() does not guarantee progress, and should not
be used. cond_resched or wait_event are a safe alternative.
Signed-off-by: Thomas Avery <tavery321@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 4a6af72013fa..85f7769ecc2d 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -701,7 +701,7 @@ void LPS_Leave_check(
bReady = false;
start_time = jiffies;
- yield();
+ cond_resched();
while (1) {
down(&pwrpriv->lock);
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] staging: rtl8723bs: Replace yield() call with cond_resched()
@ 2018-03-19 22:11 ` Thomas Avery
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Avery @ 2018-03-19 22:11 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, kernel-janitors
Remove yield() call. yield() does not guarantee progress, and should not
be used. cond_resched or wait_event are a safe alternative.
Signed-off-by: Thomas Avery <tavery321@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 4a6af72013fa..85f7769ecc2d 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -701,7 +701,7 @@ void LPS_Leave_check(
bReady = false;
start_time = jiffies;
- yield();
+ cond_resched();
while (1) {
down(&pwrpriv->lock);
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] staging: rtl8723bs: Replace yield() call with cond_resched()
@ 2018-03-19 22:09 Thomas Avery
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Avery @ 2018-03-19 22:09 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, kernel-janitors
Remove yield() call. yield() does not guarantee progress, and should not
be used. cond_resched or wait_event are a safe alternative.
Signed-off-by: Thomas Avery <tavery321@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 4a6af72013fa..85f7769ecc2d 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -701,7 +701,7 @@ void LPS_Leave_check(
bReady = false;
start_time = jiffies;
- yield();
+ cond_resched();
while (1) {
down(&pwrpriv->lock);
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-19 22:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-19 22:11 [PATCH] staging: rtl8723bs: Replace yield() call with cond_resched() Thomas Avery
2018-03-19 22:11 ` Thomas Avery
-- strict thread matches above, loose matches on Subject: below --
2018-03-19 22:09 Thomas Avery
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.