Skip to content

Commit

Permalink
ARC: make write_aux_reg safer against macro substitution
Browse files Browse the repository at this point in the history
It was generating warnings when called as write_aux_reg(x, paddr >> 32)

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
  • Loading branch information
Vineet Gupta committed Oct 17, 2015
1 parent 9fabcc6 commit 5c35ee6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arc/include/asm/arcregs.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@

/* 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

Expand Down

0 comments on commit 5c35ee6

Please sign in to comment.