linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tee: optee: remove need_resched() before cond_resched()
@ 2021-01-25  9:54 Jens Wiklander
  2021-01-25  9:57 ` Jens Wiklander
       [not found] ` <0100017738faac80-87e5cf40-6a5a-4727-9c36-382fb909c8ff-000000@email.amazonses.com>
  0 siblings, 2 replies; 5+ messages in thread
From: Jens Wiklander @ 2021-01-25  9:54 UTC (permalink / raw)
  To: linux-kernel, op-tee
  Cc: Arnd Bergmann, Rouven Czerwinski, Sumit Garg, Jens Wiklander

Testing need_resched() before cond_resched() is not needed as an
equivalent test is done internally in cond_resched(). So drop the
need_resched() test.

Fixes: dcb3b06d9c34 ("tee: optee: replace might_sleep with cond_resched")
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
---
 drivers/tee/optee/call.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c
index 780d7c4fd756..7a77e375b503 100644
--- a/drivers/tee/optee/call.c
+++ b/drivers/tee/optee/call.c
@@ -149,8 +149,7 @@ u32 optee_do_call_with_arg(struct tee_context *ctx, phys_addr_t parg)
 			 */
 			optee_cq_wait_for_completion(&optee->call_queue, &w);
 		} else if (OPTEE_SMC_RETURN_IS_RPC(res.a0)) {
-			if (need_resched())
-				cond_resched();
+			cond_resched();
 			param.a0 = res.a0;
 			param.a1 = res.a1;
 			param.a2 = res.a2;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-03  7:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-25  9:54 [PATCH] tee: optee: remove need_resched() before cond_resched() Jens Wiklander
2021-01-25  9:57 ` Jens Wiklander
     [not found] ` <0100017738faac80-87e5cf40-6a5a-4727-9c36-382fb909c8ff-000000@email.amazonses.com>
     [not found]   ` <CAHUa44GsbxO=wJ_o-AZsxNvKOhn=y=dexkrN17zCy=7+0=1ZQg@mail.gmail.com>
2021-01-31  8:13     ` Rouven Czerwinski
2021-02-01  5:02     ` Sumit Garg
2021-02-03  7:10     ` Jens Wiklander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).