diff mbox

soc: qcom: smd-rpm: Correct the active vs sleep state flagging

Message ID 1444769863-16190-1-git-send-email-bjorn.andersson@sonymobile.com (mailing list archive)
State Accepted, archived
Delegated to: Andy Gross
Headers show

Commit Message

Bjorn Andersson Oct. 13, 2015, 8:57 p.m. UTC
The BIT() was incorrectly inherited from family A and should not be used
on family B where the state is denoted by an enum.

Reported-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
---
 drivers/soc/qcom/smd-rpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andy Gross Oct. 14, 2015, 2:15 a.m. UTC | #1
On Tue, Oct 13, 2015 at 01:57:43PM -0700, Bjorn Andersson wrote:
> The BIT() was incorrectly inherited from family A and should not be used
> on family B where the state is denoted by an enum.
> 
> Reported-by: Georgi Djakov <georgi.djakov@linaro.org>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> ---
>  drivers/soc/qcom/smd-rpm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/qcom/smd-rpm.c b/drivers/soc/qcom/smd-rpm.c
> index b5feb58dbd9f..2969321e1b09 100644
> --- a/drivers/soc/qcom/smd-rpm.c
> +++ b/drivers/soc/qcom/smd-rpm.c
> @@ -126,7 +126,7 @@ int qcom_rpm_smd_write(struct qcom_smd_rpm *rpm,
>  	pkt->hdr.length = cpu_to_le32(sizeof(struct qcom_rpm_request) + count);
>  
>  	pkt->req.msg_id = cpu_to_le32(msg_id++);
> -	pkt->req.flags = cpu_to_le32(BIT(state));
> +	pkt->req.flags = cpu_to_le32(state);

Right, nice catch.  I'll queue it up.
Georgi Djakov Oct. 14, 2015, 7:27 a.m. UTC | #2
On 10/13/2015 11:57 PM, Bjorn Andersson wrote:
> The BIT() was incorrectly inherited from family A and should not be used
> on family B where the state is denoted by an enum.
> 
> Reported-by: Georgi Djakov <georgi.djakov@linaro.org>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>

Tested-by: Georgi Djakov <georgi.djakov@linaro.org>

> ---
>  drivers/soc/qcom/smd-rpm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/qcom/smd-rpm.c b/drivers/soc/qcom/smd-rpm.c
> index b5feb58dbd9f..2969321e1b09 100644
> --- a/drivers/soc/qcom/smd-rpm.c
> +++ b/drivers/soc/qcom/smd-rpm.c
> @@ -126,7 +126,7 @@ int qcom_rpm_smd_write(struct qcom_smd_rpm *rpm,
>  	pkt->hdr.length = cpu_to_le32(sizeof(struct qcom_rpm_request) + count);
>  
>  	pkt->req.msg_id = cpu_to_le32(msg_id++);
> -	pkt->req.flags = cpu_to_le32(BIT(state));
> +	pkt->req.flags = cpu_to_le32(state);
>  	pkt->req.type = cpu_to_le32(type);
>  	pkt->req.id = cpu_to_le32(id);
>  	pkt->req.data_len = cpu_to_le32(count);
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/soc/qcom/smd-rpm.c b/drivers/soc/qcom/smd-rpm.c
index b5feb58dbd9f..2969321e1b09 100644
--- a/drivers/soc/qcom/smd-rpm.c
+++ b/drivers/soc/qcom/smd-rpm.c
@@ -126,7 +126,7 @@  int qcom_rpm_smd_write(struct qcom_smd_rpm *rpm,
 	pkt->hdr.length = cpu_to_le32(sizeof(struct qcom_rpm_request) + count);
 
 	pkt->req.msg_id = cpu_to_le32(msg_id++);
-	pkt->req.flags = cpu_to_le32(BIT(state));
+	pkt->req.flags = cpu_to_le32(state);
 	pkt->req.type = cpu_to_le32(type);
 	pkt->req.id = cpu_to_le32(id);
 	pkt->req.data_len = cpu_to_le32(count);