* [RFC] ARM: zynq: fix "'IO_SPACE_LIMIT' redefined" warning @ 2019-01-09 20:27 Antony Pavlov 2019-01-09 21:07 ` Sam Ravnborg 2019-01-10 8:38 ` Sascha Hauer 0 siblings, 2 replies; 5+ messages in thread From: Antony Pavlov @ 2019-01-09 20:27 UTC (permalink / raw) To: barebox; +Cc: Steffen Trumtrar The patch fixes the following compiler's warning: In file included from include/common.h:33:0, from arch/arm/mach-zynq/zynq.c:18: arch/arm/include/asm/io.h:4:0: warning: "IO_SPACE_LIMIT" redefined #define IO_SPACE_LIMIT 0 In file included from arch/arm/mach-zynq/zynq.c:17:0: include/asm-generic/io.h:92:0: note: this is the location of the previous definition #define IO_SPACE_LIMIT 0xffff Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> --- arch/arm/mach-zynq/zynq.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-zynq/zynq.c b/arch/arm/mach-zynq/zynq.c index a0a8d0d249..dd8f12c16a 100644 --- a/arch/arm/mach-zynq/zynq.c +++ b/arch/arm/mach-zynq/zynq.c @@ -14,7 +14,6 @@ */ #include <asm/system.h> -#include <asm-generic/io.h> #include <common.h> #include <init.h> #include <restart.h> -- 2.20.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC] ARM: zynq: fix "'IO_SPACE_LIMIT' redefined" warning 2019-01-09 20:27 [RFC] ARM: zynq: fix "'IO_SPACE_LIMIT' redefined" warning Antony Pavlov @ 2019-01-09 21:07 ` Sam Ravnborg 2019-01-10 8:38 ` Sascha Hauer 1 sibling, 0 replies; 5+ messages in thread From: Sam Ravnborg @ 2019-01-09 21:07 UTC (permalink / raw) To: Antony Pavlov; +Cc: barebox, Steffen Trumtrar Hi Anthony. On Wed, Jan 09, 2019 at 11:27:54PM +0300, Antony Pavlov wrote: > The patch fixes the following compiler's warning: > > In file included from include/common.h:33:0, > from arch/arm/mach-zynq/zynq.c:18: > arch/arm/include/asm/io.h:4:0: warning: "IO_SPACE_LIMIT" redefined > #define IO_SPACE_LIMIT 0 > > In file included from > arch/arm/mach-zynq/zynq.c:17:0: > include/asm-generic/io.h:92:0: note: this is the location of the previous definition > #define IO_SPACE_LIMIT 0xffff > > Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de> > Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> > --- > arch/arm/mach-zynq/zynq.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/arch/arm/mach-zynq/zynq.c b/arch/arm/mach-zynq/zynq.c > index a0a8d0d249..dd8f12c16a 100644 > --- a/arch/arm/mach-zynq/zynq.c > +++ b/arch/arm/mach-zynq/zynq.c > @@ -14,7 +14,6 @@ > */ > > #include <asm/system.h> > -#include <asm-generic/io.h> > #include <common.h> > #include <init.h> > #include <restart.h> This patch rely on other headers to pull in <asm/io.h>. As zynq.c uses a lot of functions from <asm/io.h> then using an explicit include would be better. Just my opinion, you could argue this is bikeshedding. Sam _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC] ARM: zynq: fix "'IO_SPACE_LIMIT' redefined" warning 2019-01-09 20:27 [RFC] ARM: zynq: fix "'IO_SPACE_LIMIT' redefined" warning Antony Pavlov 2019-01-09 21:07 ` Sam Ravnborg @ 2019-01-10 8:38 ` Sascha Hauer 2019-01-10 10:55 ` Antony Pavlov 1 sibling, 1 reply; 5+ messages in thread From: Sascha Hauer @ 2019-01-10 8:38 UTC (permalink / raw) To: Antony Pavlov; +Cc: barebox, Steffen Trumtrar On Wed, Jan 09, 2019 at 11:27:54PM +0300, Antony Pavlov wrote: > The patch fixes the following compiler's warning: > > In file included from include/common.h:33:0, > from arch/arm/mach-zynq/zynq.c:18: > arch/arm/include/asm/io.h:4:0: warning: "IO_SPACE_LIMIT" redefined > #define IO_SPACE_LIMIT 0 > > In file included from > arch/arm/mach-zynq/zynq.c:17:0: > include/asm-generic/io.h:92:0: note: this is the location of the previous definition > #define IO_SPACE_LIMIT 0xffff > > Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de> > Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> > --- > arch/arm/mach-zynq/zynq.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/arch/arm/mach-zynq/zynq.c b/arch/arm/mach-zynq/zynq.c > index a0a8d0d249..dd8f12c16a 100644 > --- a/arch/arm/mach-zynq/zynq.c > +++ b/arch/arm/mach-zynq/zynq.c > @@ -14,7 +14,6 @@ > */ > > #include <asm/system.h> > -#include <asm-generic/io.h> asm-generic/io.h shouldn't be included directly, but only from asm/io.h if it decides to do so. io.h includes asm/io.h, so this is the one that should be included instead. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC] ARM: zynq: fix "'IO_SPACE_LIMIT' redefined" warning 2019-01-10 8:38 ` Sascha Hauer @ 2019-01-10 10:55 ` Antony Pavlov 2019-01-10 11:01 ` Sascha Hauer 0 siblings, 1 reply; 5+ messages in thread From: Antony Pavlov @ 2019-01-10 10:55 UTC (permalink / raw) To: Sascha Hauer; +Cc: barebox, Steffen Trumtrar On Thu, 10 Jan 2019 09:38:25 +0100 Sascha Hauer <s.hauer@pengutronix.de> wrote: > On Wed, Jan 09, 2019 at 11:27:54PM +0300, Antony Pavlov wrote: > > The patch fixes the following compiler's warning: > > > > In file included from include/common.h:33:0, > > from arch/arm/mach-zynq/zynq.c:18: > > arch/arm/include/asm/io.h:4:0: warning: "IO_SPACE_LIMIT" redefined > > #define IO_SPACE_LIMIT 0 > > > > In file included from > > arch/arm/mach-zynq/zynq.c:17:0: > > include/asm-generic/io.h:92:0: note: this is the location of the previous definition > > #define IO_SPACE_LIMIT 0xffff > > > > Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de> > > Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> > > --- > > arch/arm/mach-zynq/zynq.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/arch/arm/mach-zynq/zynq.c b/arch/arm/mach-zynq/zynq.c > > index a0a8d0d249..dd8f12c16a 100644 > > --- a/arch/arm/mach-zynq/zynq.c > > +++ b/arch/arm/mach-zynq/zynq.c > > @@ -14,7 +14,6 @@ > > */ > > > > #include <asm/system.h> > > -#include <asm-generic/io.h> > > asm-generic/io.h shouldn't be included directly, but only from asm/io.h > if it decides to do so. io.h includes asm/io.h, so this is the one that > should be included instead. common.h includes asm/io.h, please see full patch context: --- a/arch/arm/mach-zynq/zynq.c +++ b/arch/arm/mach-zynq/zynq.c @@ -14,7 +14,6 @@ */ #include <asm/system.h> -#include <asm-generic/io.h> #include <common.h> #include <init.h> #include <restart.h> The question is, should we just drop this "#include <asm-generic/io.h>" or change "#include <asm-generic/io.h>" into "#include <io.h>". -- Best regards, Antony Pavlov _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC] ARM: zynq: fix "'IO_SPACE_LIMIT' redefined" warning 2019-01-10 10:55 ` Antony Pavlov @ 2019-01-10 11:01 ` Sascha Hauer 0 siblings, 0 replies; 5+ messages in thread From: Sascha Hauer @ 2019-01-10 11:01 UTC (permalink / raw) To: Antony Pavlov; +Cc: barebox, Steffen Trumtrar On Thu, Jan 10, 2019 at 01:55:19PM +0300, Antony Pavlov wrote: > On Thu, 10 Jan 2019 09:38:25 +0100 > Sascha Hauer <s.hauer@pengutronix.de> wrote: > > > On Wed, Jan 09, 2019 at 11:27:54PM +0300, Antony Pavlov wrote: > > > The patch fixes the following compiler's warning: > > > > > > In file included from include/common.h:33:0, > > > from arch/arm/mach-zynq/zynq.c:18: > > > arch/arm/include/asm/io.h:4:0: warning: "IO_SPACE_LIMIT" redefined > > > #define IO_SPACE_LIMIT 0 > > > > > > In file included from > > > arch/arm/mach-zynq/zynq.c:17:0: > > > include/asm-generic/io.h:92:0: note: this is the location of the previous definition > > > #define IO_SPACE_LIMIT 0xffff > > > > > > Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de> > > > Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> > > > --- > > > arch/arm/mach-zynq/zynq.c | 1 - > > > 1 file changed, 1 deletion(-) > > > > > > diff --git a/arch/arm/mach-zynq/zynq.c b/arch/arm/mach-zynq/zynq.c > > > index a0a8d0d249..dd8f12c16a 100644 > > > --- a/arch/arm/mach-zynq/zynq.c > > > +++ b/arch/arm/mach-zynq/zynq.c > > > @@ -14,7 +14,6 @@ > > > */ > > > > > > #include <asm/system.h> > > > -#include <asm-generic/io.h> > > > > asm-generic/io.h shouldn't be included directly, but only from asm/io.h > > if it decides to do so. io.h includes asm/io.h, so this is the one that > > should be included instead. > > common.h includes asm/io.h, please see full patch context: > > --- a/arch/arm/mach-zynq/zynq.c > +++ b/arch/arm/mach-zynq/zynq.c > @@ -14,7 +14,6 @@ > */ > > #include <asm/system.h> > -#include <asm-generic/io.h> > #include <common.h> > #include <init.h> > #include <restart.h> > > > The question is, should we just drop this "#include <asm-generic/io.h>" or > change "#include <asm-generic/io.h>" into "#include <io.h>". Since this file really uses readl and friends I'd say let's change it to "#include <io.h>" rather than removing the inclusion. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-01-10 11:01 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-01-09 20:27 [RFC] ARM: zynq: fix "'IO_SPACE_LIMIT' redefined" warning Antony Pavlov 2019-01-09 21:07 ` Sam Ravnborg 2019-01-10 8:38 ` Sascha Hauer 2019-01-10 10:55 ` Antony Pavlov 2019-01-10 11:01 ` Sascha Hauer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox