Skip to contentSkip to conversation

regulator: qcom_rpm: Fix FORCE_MODE_IS_2_BITS macro

PATCH Applied Axel Lin 2 participants 2 messages Sep 25, 2014 – Sep 26, 2014

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 regulator: qcom_rpm: Fix FORCE_MODE_IS_2_BITS macro

Current code does not take the macro parameter, fix it.
This is not a problem at this moment because the only user actually passes vreg to FORCE_MODE_IS_2_BITS().

---
 drivers/regulator/qcom_rpm-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/qcom_rpm-regulator.c +1 -1
index 8d5969a..b55cd5b 100644
@@ -50,7 +50,7 @@ struct rpm_reg_parts {
 };
 
 #define FORCE_MODE_IS_2_BITS(reg) \
-	((vreg->parts->fm.mask >> vreg->parts->fm.shift) == 3)
+	(((reg)->parts->fm.mask >> (reg)->parts->fm.shift) == 3)
 
 struct qcom_rpm_reg {
 	struct qcom_rpm *rpm;
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw
Quoted 3 lines · Axel Lin

Current code does not take the macro parameter, fix it.
This is not a problem at this moment because the only user actually passes vreg to FORCE_MODE_IS_2_BITS().

Applied, thanks.