OSDN Git Service

tee: optee: remove need_resched() before cond_resched()
authorJens Wiklander <jens.wiklander@linaro.org>
Mon, 25 Jan 2021 09:36:57 +0000 (10:36 +0100)
committerJens Wiklander <jens.wiklander@linaro.org>
Wed, 3 Feb 2021 07:11:11 +0000 (08:11 +0100)
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")
Reviewed-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Tested-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Tested-by: Sumit Garg <sumit.garg@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
drivers/tee/optee/call.c

index 780d7c4..7a77e37 100644 (file)
@@ -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;