Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: pgaikwad@nvidia.com (Prashant Gaikwad)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: fix psci power state pack
Date: Wed, 12 Feb 2014 14:52:38 +0530	[thread overview]
Message-ID: <1392196958-2507-1-git-send-email-pgaikwad@nvidia.com> (raw)

Values has to be shifted right to create pack.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
---
 arch/arm64/kernel/psci.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c
index 4f97db3..6e8f1df 100644
--- a/arch/arm64/kernel/psci.c
+++ b/arch/arm64/kernel/psci.c
@@ -87,11 +87,11 @@ static int psci_to_linux_errno(int errno)
 static u32 psci_power_state_pack(struct psci_power_state state)
 {
 	return	((state.id & PSCI_POWER_STATE_ID_MASK)
-			<< PSCI_POWER_STATE_ID_SHIFT)	|
+			>> PSCI_POWER_STATE_ID_SHIFT)	|
 		((state.type & PSCI_POWER_STATE_TYPE_MASK)
-			<< PSCI_POWER_STATE_TYPE_SHIFT)	|
+			>> PSCI_POWER_STATE_TYPE_SHIFT)	|
 		((state.affinity_level & PSCI_POWER_STATE_AFFL_MASK)
-			<< PSCI_POWER_STATE_AFFL_SHIFT);
+			>> PSCI_POWER_STATE_AFFL_SHIFT);
 }
 
 /*
-- 
1.7.4.1

             reply	other threads:[~2014-02-12  9:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12  9:22 Prashant Gaikwad [this message]
2014-02-12 10:19 ` [PATCH] arm64: fix psci power state pack Will Deacon
2014-02-12 10:42   ` Prashant Gaikwad

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=1392196958-2507-1-git-send-email-pgaikwad@nvidia.com \
    --to=pgaikwad@nvidia.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