ARC: make write_aux_reg safer against macro substitution
authorVineet Gupta <vgupta@synopsys.com>
Tue, 29 Sep 2015 10:35:48 +0000 (16:05 +0530)
committerVineet Gupta <vgupta@synopsys.com>
Sat, 17 Oct 2015 12:18:24 +0000 (17:48 +0530)
It was generating warnings when called as write_aux_reg(x, paddr >> 32)

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/include/asm/arcregs.h

index d8023bc8d1ad687c26a57ee6873509d0d1570222..431e82893fc820c98dd49fa38ee0b84958264e85 100644 (file)
 
 /* gcc builtin sr needs reg param to be long immediate */
 #define write_aux_reg(reg_immed, val)          \
-               __builtin_arc_sr((unsigned int)val, reg_immed)
+               __builtin_arc_sr((unsigned int)(val), reg_immed)
 
 #else
 
This page took 0.025264 seconds and 5 git commands to generate.