powerpc: Cleanup macros in ppc-opcode.h
authorMichael Neuling <mikey@neuling.org>
Wed, 29 Apr 2009 20:58:01 +0000 (20:58 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 21 May 2009 05:44:21 +0000 (15:44 +1000)
Make macros more braces happy.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/ppc-opcode.h

index 640ccbb..1c81950 100644 (file)
 #define PPC_INST_WAIT                  0x7c00007c
 
 /* macros to insert fields into opcodes */
-#define __PPC_RA(a)    ((a & 0x1f) << 16)
-#define __PPC_RB(b)    ((b & 0x1f) << 11)
-#define __PPC_T_TLB(t) ((t & 0x3) << 21)
-#define __PPC_WC(w)    ((w & 0x3) << 21)
+#define __PPC_RA(a)    (((a) & 0x1f) << 16)
+#define __PPC_RB(b)    (((b) & 0x1f) << 11)
+#define __PPC_T_TLB(t) (((t) & 0x3) << 21)
+#define __PPC_WC(w)    (((w) & 0x3) << 21)
 
 /* Deal with instructions that older assemblers aren't aware of */
 #define        PPC_DCBAL(a, b)         stringify_in_c(.long PPC_INST_DCBAL | \