All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: qcom_rpm: Fix FORCE_MODE_IS_2_BITS macro
@ 2014-09-25  2:17 Axel Lin
  2014-09-26  8:28 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2014-09-25  2:17 UTC (permalink / raw)
  To: Mark Brown; +Cc: Bjorn Andersson, Liam Girdwood, linux-kernel

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().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/qcom_rpm-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/qcom_rpm-regulator.c b/drivers/regulator/qcom_rpm-regulator.c
index 8d5969a..b55cd5b 100644
--- a/drivers/regulator/qcom_rpm-regulator.c
+++ b/drivers/regulator/qcom_rpm-regulator.c
@@ -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;
-- 
1.9.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] regulator: qcom_rpm: Fix FORCE_MODE_IS_2_BITS macro
  2014-09-25  2:17 [PATCH] regulator: qcom_rpm: Fix FORCE_MODE_IS_2_BITS macro Axel Lin
@ 2014-09-26  8:28 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-09-26  8:28 UTC (permalink / raw)
  To: Axel Lin; +Cc: Bjorn Andersson, Liam Girdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

On Thu, Sep 25, 2014 at 10:17:29AM +0800, Axel Lin wrote:
> 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.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-26  8:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-25  2:17 [PATCH] regulator: qcom_rpm: Fix FORCE_MODE_IS_2_BITS macro Axel Lin
2014-09-26  8:28 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.