* [PATCH] ARM: at91: avoid defining CONFIG_* symbols in source code
@ 2016-02-23 14:39 ` Arnd Bergmann
0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2016-02-23 14:39 UTC (permalink / raw)
To: Nicolas Ferre, Alexandre Belloni
Cc: linux-arm-kernel, Arnd Bergmann,
Jean-Christophe Plagniol-Villard, Russell King, linux-kernel
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>
---
arch/arm/include/debug/at91.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/debug/at91.S b/arch/arm/include/debug/at91.S
index 43243be94cfc..d4ae3b8e2426 100644
--- a/arch/arm/include/debug/at91.S
+++ b/arch/arm/include/debug/at91.S
@@ -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
--
2.7.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] ARM: at91: avoid defining CONFIG_* symbols in source code
@ 2016-02-23 14:39 ` Arnd Bergmann
0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2016-02-23 14:39 UTC (permalink / raw)
To: linux-arm-kernel
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>
---
arch/arm/include/debug/at91.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/debug/at91.S b/arch/arm/include/debug/at91.S
index 43243be94cfc..d4ae3b8e2426 100644
--- a/arch/arm/include/debug/at91.S
+++ b/arch/arm/include/debug/at91.S
@@ -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
--
2.7.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] ARM: at91: avoid defining CONFIG_* symbols in source code
2016-02-23 14:39 ` Arnd Bergmann
@ 2016-03-01 8:56 ` Alexandre Belloni
-1 siblings, 0 replies; 8+ messages in thread
From: Alexandre Belloni @ 2016-03-01 8:56 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Nicolas Ferre, linux-arm-kernel,
Jean-Christophe Plagniol-Villard, Russell King, linux-kernel
On 23/02/2016 at 15:39:38 +0100, Arnd Bergmann wrote :
> 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>
> ---
> arch/arm/include/debug/at91.S | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/include/debug/at91.S b/arch/arm/include/debug/at91.S
> index 43243be94cfc..d4ae3b8e2426 100644
> --- a/arch/arm/include/debug/at91.S
> +++ b/arch/arm/include/debug/at91.S
> @@ -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
> --
> 2.7.0
>
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ARM: at91: avoid defining CONFIG_* symbols in source code
@ 2016-03-01 8:56 ` Alexandre Belloni
0 siblings, 0 replies; 8+ messages in thread
From: Alexandre Belloni @ 2016-03-01 8:56 UTC (permalink / raw)
To: linux-arm-kernel
On 23/02/2016 at 15:39:38 +0100, Arnd Bergmann wrote :
> 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>
> ---
> arch/arm/include/debug/at91.S | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/include/debug/at91.S b/arch/arm/include/debug/at91.S
> index 43243be94cfc..d4ae3b8e2426 100644
> --- a/arch/arm/include/debug/at91.S
> +++ b/arch/arm/include/debug/at91.S
> @@ -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
> --
> 2.7.0
>
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ARM: at91: avoid defining CONFIG_* symbols in source code
2016-02-23 14:39 ` Arnd Bergmann
@ 2016-03-02 15:46 ` Nicolas Ferre
-1 siblings, 0 replies; 8+ messages in thread
From: Nicolas Ferre @ 2016-03-02 15:46 UTC (permalink / raw)
To: Arnd Bergmann, Alexandre Belloni, Olof Johansson, ARM Maintainers
Cc: linux-arm-kernel, Jean-Christophe Plagniol-Villard, Russell King,
linux-kernel
Le 23/02/2016 15:39, Arnd Bergmann a écrit :
> 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: Nicolas Ferre <nicolas.ferre@atmel.com>
Arnd,
Can you please add this patch on top of the arm-soc branches "soc" or
"cleanup" for 4.6.
I don't think that we will have more material for these branches to send
to you before the opening of the merge window.
Thanks for your patch, bye.
> ---
> arch/arm/include/debug/at91.S | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/include/debug/at91.S b/arch/arm/include/debug/at91.S
> index 43243be94cfc..d4ae3b8e2426 100644
> --- a/arch/arm/include/debug/at91.S
> +++ b/arch/arm/include/debug/at91.S
> @@ -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
>
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ARM: at91: avoid defining CONFIG_* symbols in source code
@ 2016-03-02 15:46 ` Nicolas Ferre
0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Ferre @ 2016-03-02 15:46 UTC (permalink / raw)
To: linux-arm-kernel
Le 23/02/2016 15:39, Arnd Bergmann a ?crit :
> 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: Nicolas Ferre <nicolas.ferre@atmel.com>
Arnd,
Can you please add this patch on top of the arm-soc branches "soc" or
"cleanup" for 4.6.
I don't think that we will have more material for these branches to send
to you before the opening of the merge window.
Thanks for your patch, bye.
> ---
> arch/arm/include/debug/at91.S | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/include/debug/at91.S b/arch/arm/include/debug/at91.S
> index 43243be94cfc..d4ae3b8e2426 100644
> --- a/arch/arm/include/debug/at91.S
> +++ b/arch/arm/include/debug/at91.S
> @@ -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
>
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ARM: at91: avoid defining CONFIG_* symbols in source code
2016-03-02 15:46 ` Nicolas Ferre
@ 2016-03-02 16:31 ` Arnd Bergmann
-1 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2016-03-02 16:31 UTC (permalink / raw)
To: Nicolas Ferre
Cc: Alexandre Belloni, Olof Johansson, ARM Maintainers,
linux-arm-kernel, Jean-Christophe Plagniol-Villard, Russell King,
linux-kernel
On Wednesday 02 March 2016 16:46:35 Nicolas Ferre wrote:
> Le 23/02/2016 15:39, Arnd Bergmann a écrit :
> > 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: Nicolas Ferre <nicolas.ferre@atmel.com>
>
> Arnd,
>
> Can you please add this patch on top of the arm-soc branches "soc" or
> "cleanup" for 4.6.
> I don't think that we will have more material for these branches to send
> to you before the opening of the merge window.
>
> Thanks for your patch, bye.
Applied to next/soc, thanks!
Arnd
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ARM: at91: avoid defining CONFIG_* symbols in source code
@ 2016-03-02 16:31 ` Arnd Bergmann
0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2016-03-02 16:31 UTC (permalink / raw)
To: linux-arm-kernel
On Wednesday 02 March 2016 16:46:35 Nicolas Ferre wrote:
> Le 23/02/2016 15:39, Arnd Bergmann a ?crit :
> > 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: Nicolas Ferre <nicolas.ferre@atmel.com>
>
> Arnd,
>
> Can you please add this patch on top of the arm-soc branches "soc" or
> "cleanup" for 4.6.
> I don't think that we will have more material for these branches to send
> to you before the opening of the merge window.
>
> Thanks for your patch, bye.
Applied to next/soc, thanks!
Arnd
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-03-02 16:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-23 14:39 [PATCH] ARM: at91: avoid defining CONFIG_* symbols in source code Arnd Bergmann
2016-02-23 14:39 ` Arnd Bergmann
2016-03-01 8:56 ` Alexandre Belloni
2016-03-01 8:56 ` Alexandre Belloni
2016-03-02 15:46 ` Nicolas Ferre
2016-03-02 15:46 ` Nicolas Ferre
2016-03-02 16:31 ` Arnd Bergmann
2016-03-02 16:31 ` Arnd Bergmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.