diff mbox

[6/8] drm/i915: add parentheses around PIXCLK_GATE definitions

Message ID 1344446134-3704-7-git-send-email-przanoni@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paulo Zanoni Aug. 8, 2012, 5:15 p.m. UTC
From: Paulo Zanoni <paulo.r.zanoni@intel.com>

By looking at the current way we're using these definitions I don't
think this commit will fix any bug, but programmers from the future
are evil and will certainly find ways to combine macro expansion with
operator precedence to introduce bugs that are hard to find.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Daniel Vetter Aug. 9, 2012, 4:43 p.m. UTC | #1
On Wed, Aug 08, 2012 at 02:15:32PM -0300, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> 
> By looking at the current way we're using these definitions I don't
> think this commit will fix any bug, but programmers from the future
> are evil and will certainly find ways to combine macro expansion with
> operator precedence to introduce bugs that are hard to find.
> 
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
I've applied all patches up to and including this one here (with the pbc
mispell fixed). I agree with Jani's bikeshed on patch 7, and I think we
need to discuss patch 8 some more on irc. I think something similar to the
pch pll sharing is required here.

Thanks for the patches&review.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index af41d03..321ae72 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -4395,8 +4395,8 @@ 
 
 /* LPT PIXCLK_GATE */
 #define PIXCLK_GATE			0xC6020
-#define  PIXCLK_GATE_UNGATE		1<<0
-#define  PIXCLK_GATE_GATE		0<<0
+#define  PIXCLK_GATE_UNGATE		(1<<0)
+#define  PIXCLK_GATE_GATE		(0<<0)
 
 /* SPLL */
 #define SPLL_CTL			0x46020