linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jszhang@marvell.com (Jisheng Zhang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] arm64: cpuidle: remove cpu_ops check from arm_cpuidle_suspend()
Date: Thu, 24 Mar 2016 13:08:49 +0800	[thread overview]
Message-ID: <1458796130-6109-2-git-send-email-jszhang@marvell.com> (raw)
In-Reply-To: <1458796130-6109-1-git-send-email-jszhang@marvell.com>

If cpu_ops has not been registered, arm_cpuidle_init() will return
-EOPNOTSUPP, so arm_cpuidle_suspend() will never have chance to
run. In other word, the cpu_ops check can be avoid.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
 arch/arm64/kernel/cpuidle.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/kernel/cpuidle.c b/arch/arm64/kernel/cpuidle.c
index 9047cab6..bd57c59 100644
--- a/arch/arm64/kernel/cpuidle.c
+++ b/arch/arm64/kernel/cpuidle.c
@@ -37,10 +37,9 @@ int arm_cpuidle_suspend(int index)
 	int cpu = smp_processor_id();
 
 	/*
-	 * If cpu_ops have not been registered or suspend
-	 * has not been initialized, cpu_suspend call fails early.
+	 * If suspend has not been initialized, cpu_suspend call fails early.
 	 */
-	if (!cpu_ops[cpu] || !cpu_ops[cpu]->cpu_suspend)
+	if (!cpu_ops[cpu]->cpu_suspend)
 		return -EOPNOTSUPP;
 	return cpu_ops[cpu]->cpu_suspend(index);
 }
-- 
2.8.0.rc3

  reply	other threads:[~2016-03-24  5:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24  5:08 [PATCH 0/2] arm64: cpuidle: make arm_cpuidle_suspend() more efficient Jisheng Zhang
2016-03-24  5:08 ` Jisheng Zhang [this message]
2016-03-24  5:08 ` [PATCH 2/2] arm64: cpuidle: make arm_cpuidle_suspend() a bit " Jisheng Zhang
     [not found] ` <20160324111507.GB9323@arm.com>
2016-03-24 13:18   ` [PATCH 0/2] arm64: cpuidle: make arm_cpuidle_suspend() " Jisheng Zhang
2016-03-24 16:44     ` Lorenzo Pieralisi
2016-03-25  2:40       ` Jisheng Zhang

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=1458796130-6109-2-git-send-email-jszhang@marvell.com \
    --to=jszhang@marvell.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).