Skip to contentSkip to conversation

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

PATCH In review Bjorn Andersson 3 participants 3 messages Oct 13, 2015 – Oct 14, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

The BIT() was incorrectly inherited from family A and should not be used on family B where the state is denoted by an enum.

---
 drivers/soc/qcom/smd-rpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/qcom/smd-rpm.c +1 -1
index b5feb58dbd9f..2969321e1b09 100644
@@ -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);
Signature · 1 line
2.4.2
#1 lore raw
Quoted 14 lines · Bjorn Andersson

The BIT() was incorrectly inherited from family A and should not be used on family B where the state is denoted by an enum.

---
 drivers/soc/qcom/smd-rpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/qcom/smd-rpm.c +0 -0
index b5feb58dbd9f..2969321e1b09 100644

drivers/soc/qcom/smd-rpm.c int qcom_rpm_smd_write(struct qcom_smd_rpm *rpm, · line 129

Quoted 5 lines
drivers/soc/qcom/smd-rpm.c +1 -1
@@ -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.

Signature · 3 lines
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
Tested-by on v1 1/1
#2 lore raw
In reply to Bjorn Andersson
Quoted 5 lines · Bjorn Andersson

The BIT() was incorrectly inherited from family A and should not be used on family B where the state is denoted by an enum.

Quoted 18 lines
---
 drivers/soc/qcom/smd-rpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/qcom/smd-rpm.c +1 -1
index b5feb58dbd9f..2969321e1b09 100644
@@ -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);