OMAP2+: sdrc: fix compile break on OMAP4-only config on current omap-for-linus
Subsystems (2)
PATCH 1/1 OMAP2+: sdrc: fix compile break on OMAP4-only config on current omap-for-linus
On non-OMAP2 and non-OMAP3 kernel configs, turn omap2_sdrc_init() into a no-op. Otherwise, compilation breaks on an OMAP4-only config with the current omap-for-linus branch:
arch/arm/mach-omap2/built-in.o: In function `omap2_init_common_devices':../mach-omap2/io.c:421: undefined reference to `omap2_sdrc_init'
--- arch/arm/plat-omap/include/plat/sdrc.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
arch/arm/plat-omap/include/plat/sdrc.h +5 -0
@@ -124,8 +124,13 @@ struct omap_sdrc_params {u32 mr; }; +#if defined(CONFIG_ARCH_OMAP2 ) || defined(CONFIG_ARCH_OMAP3 )void __init omap2_sdrc_init (struct omap_sdrc_params *sdrc_cs0,struct omap_sdrc_params *sdrc_cs1); +#else +#define omap2_sdrc_init (x, y) 0 +#endif +int omap2_sdrc_get_params (unsigned long r,struct omap_sdrc_params **sdrc_cs0,struct omap_sdrc_params **sdrc_cs1);
Signature · 1 line
1.7.2.3
PATCH 1/1 OMAP2+: sdrc: fix compile break on OMAP4-only config on current omap-for-linus
Hello.
Quoted 18 lines · Paul Walmsley
On non-OMAP2 and non-OMAP3 kernel configs, turn
omap2_sdrc_init()into a no-op. Otherwise, compilation breaks on an OMAP4-only config with the current omap-for-linus branch:
arch/arm/mach-omap2/built-in.o: In function `omap2_init_common_devices':../mach-omap2/io.c:421: undefined reference to `omap2_sdrc_init'Signed-off-by Paul Walmsley<[email protected]>Cc Tony Lindgren<[email protected]>--- arch/arm/plat-omap/include/plat/sdrc.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)arch/arm/plat-omap/include/plat/sdrc.h +0
-0
arch/arm/plat-omap/include/plat/sdrc.h struct omap_sdrc_params { · line 131
Quoted 8 lines
arch/arm/plat-omap/include/plat/sdrc.h +3
-0@@ -124,8 +124,13 @@ struct omap_sdrc_params {u32 mr; }; +#if defined(CONFIG_ARCH_OMAP2 ) || defined(CONFIG_ARCH_OMAP3 )void __init omap2_sdrc_init (struct omap_sdrc_params *sdrc_cs0,struct omap_sdrc_params *sdrc_cs1); +#else +#define omap2_sdrc_init (x, y) 0
How about empty inline instead?
arch/arm/plat-omap/include/plat/sdrc.h struct omap_sdrc_params { · line 133
Quoted 2 lines
arch/arm/plat-omap/include/plat/sdrc.h +2
-0+#endif +
WBR, Sergei
PATCH 1/1 OMAP2+: sdrc: fix compile break on OMAP4-only config on current omap-for-linus
Hello Sergei
Quoted 1 line · Sergei Shtylyov
How about empty inline instead?
Thanks for the review; that is indeed a better approach. Following is the updated patch.
Tony, do you want to take this one?
- Paul
From: Paul Walmsley <[email protected]>
Date: Fri, 25 Feb 2011 17:38:25 -0700
Subject: [PATCH] OMAP2+: sdrc: fix compile break on OMAP4-only config on current omap-for-linus
On non-OMAP2 and non-OMAP3 kernel configs, turn omap2_sdrc_init() into a no-op. Otherwise, compilation breaks on an OMAP4-only config with the current omap-for-linus branch:
arch/arm/mach-omap2/built-in.o: In function `omap2_init_common_devices':../mach-omap2/io.c:421: undefined reference to `omap2_sdrc_init'
Thanks to Sergei Shtylyov <[email protected]> for suggesting the use of a empty static inline function rather than a macro.
--- arch/arm/plat-omap/include/plat/sdrc.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/plat-omap/include/plat/sdrc.h +6 -0
@@ -124,8 +124,14 @@ struct omap_sdrc_params {u32 mr; }; +#if defined(CONFIG_ARCH_OMAP2 ) || defined(CONFIG_ARCH_OMAP3 )void __init omap2_sdrc_init (struct omap_sdrc_params *sdrc_cs0,struct omap_sdrc_params *sdrc_cs1); +#else +static inline void __init omap2_sdrc_init (struct omap_sdrc_params *sdrc_cs0, +struct omap_sdrc_params *sdrc_cs1) {}; +#endif +int omap2_sdrc_get_params (unsigned long r,struct omap_sdrc_params **sdrc_cs0,struct omap_sdrc_params **sdrc_cs1);
Signature · 1 line
1.7.2.3
PATCH 1/1 OMAP2+: sdrc: fix compile break on OMAP4-only config on current omap-for-linus
Hello.
Quoted 18 lines · Paul Walmsley
Quoted 1 line
How about empty inline instead?
Thanks for the review; that is indeed a better approach. Following is the updated patch.
Tony, do you want to take this one?
- Paul
From: Paul Walmsley<[email protected]>
Date: Fri, 25 Feb 2011 17:38:25 -0700
Subject: [PATCH] OMAP2+: sdrc: fix compile break on OMAP4-only config on current omap-for-linusOn non-OMAP2 and non-OMAP3 kernel configs, turn
omap2_sdrc_init()into a no-op. Otherwise, compilation breaks on an OMAP4-only config with the current omap-for-linus branch:
Quoted 5 lines
arch/arm/mach-omap2/built-in.o: In function `omap2_init_common_devices':../mach-omap2/io.c:421: undefined reference to `omap2_sdrc_init'Thanks to Sergei Shtylyov <[email protected]> for suggesting the use of a empty static inline function rather than a macro.
Not at all. :-)
Quoted 12 lines
Signed-off-by Paul Walmsley<[email protected]>Cc Tony Lindgren<[email protected]>Cc Sergei Shtylyov<[email protected]>--- arch/arm/plat-omap/include/plat/sdrc.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)arch/arm/plat-omap/include/plat/sdrc.h +0
-0
arch/arm/plat-omap/include/plat/sdrc.h struct omap_sdrc_params { · line 131
Quoted 8 lines
arch/arm/plat-omap/include/plat/sdrc.h +3
-0@@ -124,8 +124,14 @@ struct omap_sdrc_params {u32 mr; }; +#if defined(CONFIG_ARCH_OMAP2 ) || defined(CONFIG_ARCH_OMAP3 )void __init omap2_sdrc_init (struct omap_sdrc_params *sdrc_cs0,struct omap_sdrc_params *sdrc_cs1); +#else +static inline void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
No need to annotate it as __init.
arch/arm/plat-omap/include/plat/sdrc.h struct omap_sdrc_params { · line 134
Quoted 3 lines
arch/arm/plat-omap/include/plat/sdrc.h +3
-0+ struct omap_sdrc_params *sdrc_cs1) {}; +#endif +
WBR, Sergei
PATCH 1/1 OMAP2+: sdrc: fix compile break on OMAP4-only config on current omap-for-linus
Quoted 4 lines · Sergei Shtylyov
Quoted 1 line · Paul Walmsley
Tony, do you want to take this one?
Applying..
Quoted 7 lines
arch/arm/plat-omap/include/plat/sdrc.h struct omap_sdrc_params { · line 131
Quoted 5 lines
arch/arm/plat-omap/include/plat/sdrc.h +3
-0+#if defined(CONFIG_ARCH_OMAP2 ) || defined(CONFIG_ARCH_OMAP3 )void __init omap2_sdrc_init (struct omap_sdrc_params *sdrc_cs0,struct omap_sdrc_params *sdrc_cs1); +#else +static inline void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0,No need to annotate it as
__init.
..modified this.
Tony