From patchwork Mon Jan 25 09:54:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 370181 Delivered-To: patches@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp3826318jam; Mon, 25 Jan 2021 01:55:17 -0800 (PST) X-Received: by 2002:ac2:42d5:: with SMTP id n21mr223401lfl.154.1611568517595; Mon, 25 Jan 2021 01:55:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611568517; cv=none; d=google.com; s=arc-20160816; b=jzflJdAcAtoWj9QOl35xqQYWyzop7n9W3CPxs050ZAa4WBf/iHOgjtZJe37Mg6P0mt Pm00LUQXcMWuyVqkG0yjior/vDgcA3wgBXdEL1Sytw8VbAu6VppTRgPK1lQ2ckwum8IM iaq6lf+NTQJia6S/dC0jdY4SLzE4yx8YBZa0IYACR3ACV7scLIeNsd26iCCMcblzHsOj 5JDwk30L5HJLnBSSVQCvtSCBa31a8xJOCoQ+yOqGxZs3o6KnegjXi1ueW3ARhY6BEawH Dx633NuCeehZLTfUy8WpnN5g3gFm/Xd6H5WfSbGJPdOomptlbCl+6KarqcQxUdTAJxY+ FHmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=oWWqCKxEe5JOZexnW4lpG/6Y5YZX1PGnjV7kCZ+jMOI=; b=TyZdUqyw3sEwA31BRfekQvbDDNEts4zxY98i0lSk6pqPc6w4EfQ4GkNvZIEzRSqcUi r5jNgH5hO1XShPRl5GlYoEAU/nHmsLNk3Ee/wrMw5CMijVlyQngVcOU++tpXkk6m2udo OXrx7LfKzH6WJgnECbEGOh10IK6vn10Enm9ebfwKEeov9PD2mNGX4ROxoxfJGaajE5v3 9KYy1RFAnfirE9gVV0RKIoVj+H1dJADG/vZUfkPxh1S8b7H1y3RFRfTrexb6uvjwvkzT vJwCLA78MHIClxO8bjWgCN7vqky7aX0cjyrj9xzUXa+rTgsN9oZ2AWgNnboNTwxbtNym pJ7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lJpTkWGO; spf=pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=jens.wiklander@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id c127sor3374681lfd.118.2021.01.25.01.55.17 for (Google Transport Security); Mon, 25 Jan 2021 01:55:17 -0800 (PST) Received-SPF: pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lJpTkWGO; spf=pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=jens.wiklander@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oWWqCKxEe5JOZexnW4lpG/6Y5YZX1PGnjV7kCZ+jMOI=; b=lJpTkWGOuSkcSuTiplwRFmpSUe/ls//ZsRo8y/3awzDS4W2EphUupXRfKCj2HIQzbj b6gUDg4WV8HijFJZaY09wrSqxAqliAYf/jXvz9SHEcMRLUVgLs8cS27M7AgXYHgNBE1e hiDe0/7tJH7qoMWcdkaw3LgMlONjPCyrfoR2TYy4LM+xDBnxDu3G/8VsyQIjBpONIoHq VejgM/jYKcX4sxrwQnA54ohfAhDe2Okt5bA2ZzbMfcHZ3gPuLqrIzgOADZylHx29Wx+r z49Q7OxreraooZXkkbT84eSphTi8UTbPFOn5UG2NnOuG7qSJs8FgKNCPC3DtvNLiYFDD uexQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oWWqCKxEe5JOZexnW4lpG/6Y5YZX1PGnjV7kCZ+jMOI=; b=oN1IK2rN8sJGFSIMl9xw+LwOVrlLBaul0o//AxgiK+OV6pPgftsxRrBU6Bl5U9FaHn pdNP7YVPsydAj8odWgIo9reLf43kJCUWhaCq20jpPxaw21rDmaCbE58T9ECx3BMztIZG 2sNkue/Q98+wEeP436da4E7qMxECZnQz7yQJIqfwvLmx1TPOAkrlC9eyD5acKaITpEKF t0k2+VqVXFjdWV9AWBL2GHf34lMtdBJkAA7nxaBpzNkUK6OpCptzQOPdBvcAxPedmKqw J3Udy+XIRqPi4mQL1hgs0mjjfZLW9ffehqm5OJygkZJG8/o4jJ0g4O8w5aesAs48cnOZ r8mA== X-Gm-Message-State: AOAM531eVG+JGm0PsYyOE1zrmR7DTh3fxt0OAQntRxGPI0x2lbpIPczE OACbDOV+uuuuoz5fN081rBS2Y3ep X-Google-Smtp-Source: ABdhPJyKGdG7+QrZxG9kETd6JFcnYe2qaU0hpEmEr9Ixzv7ECnOSsgV9nFZL0Z0znqmRwo7finZmOA== X-Received: by 2002:a05:6512:2f3:: with SMTP id m19mr132155lfq.455.1611568517176; Mon, 25 Jan 2021 01:55:17 -0800 (PST) Return-Path: Received: from jade.urgonet (h-249-223.A175.priv.bahnhof.se. [98.128.249.223]) by smtp.gmail.com with ESMTPSA id y2sm1091328ljh.28.2021.01.25.01.55.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 01:55:16 -0800 (PST) From: Jens Wiklander To: linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org Cc: Arnd Bergmann , Rouven Czerwinski , Sumit Garg , Jens Wiklander Subject: [PATCH] tee: optee: remove need_resched() before cond_resched() Date: Mon, 25 Jan 2021 10:54:45 +0100 Message-Id: <20210125095445.1524477-1-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 --- drivers/tee/optee/call.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.25.1 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;