提交 e91fb3bd 编写于 作者: A Arnd Bergmann

ARM: at91: avoid defining CONFIG_* symbols in source code

In an invalid randconfig build (fixed by another patch),
I ran across this warning:

arch/arm/include/debug/at91.S:18:0: error: "CONFIG_DEBUG_UART_VIRT" redefined [-Werror]
 #define CONFIG_DEBUG_UART_VIRT AT91_IO_P2V(CONFIG_DEBUG_UART_PHYS)

As Russell pointed out, we should never #define a macro starting
with CONFIG_ in a source file, as that is rather confusing.

This renames the macro to avoid the symbol clash.
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Suggested-by: NRussell King <linux@arm.linux.org.uk>
Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
上级 1c277cae
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#define AT91_IO_P2V(x) (x) #define AT91_IO_P2V(x) (x)
#endif #endif
#define CONFIG_DEBUG_UART_VIRT AT91_IO_P2V(CONFIG_DEBUG_UART_PHYS) #define AT91_DEBUG_UART_VIRT AT91_IO_P2V(CONFIG_DEBUG_UART_PHYS)
#define AT91_DBGU_SR (0x14) /* Status Register */ #define AT91_DBGU_SR (0x14) /* Status Register */
#define AT91_DBGU_THR (0x1c) /* Transmitter Holding Register */ #define AT91_DBGU_THR (0x1c) /* Transmitter Holding Register */
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
.macro addruart, rp, rv, tmp .macro addruart, rp, rv, tmp
ldr \rp, =CONFIG_DEBUG_UART_PHYS @ System peripherals (phys address) ldr \rp, =CONFIG_DEBUG_UART_PHYS @ System peripherals (phys address)
ldr \rv, =CONFIG_DEBUG_UART_VIRT @ System peripherals (virt address) ldr \rv, =AT91_DEBUG_UART_VIRT @ System peripherals (virt address)
.endm .endm
.macro senduart,rd,rx .macro senduart,rd,rx
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册