]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: at91: avoid defining CONFIG_* symbols in source code
authorArnd Bergmann <arnd@arndb.de>
Tue, 23 Feb 2016 14:39:38 +0000 (15:39 +0100)
committerArnd Bergmann <arnd@arndb.de>
Wed, 2 Mar 2016 16:31:08 +0000 (17:31 +0100)
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: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Russell King <linux@arm.linux.org.uk>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
arch/arm/include/debug/at91.S

index 43243be94cfcb556d1a3a0e85f6a63089d8c89c2..d4ae3b8e2426e1ebe4cff786e01432e9b4eecbc9 100644 (file)
@@ -15,7 +15,7 @@
 #define AT91_IO_P2V(x) (x)
 #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_THR          (0x1c)  /* Transmitter Holding Register */
@@ -24,7 +24,7 @@
 
        .macro  addruart, rp, rv, tmp
        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
 
        .macro  senduart,rd,rx