[PATCH] OMAP2+: sdrc: fix compile break on OMAP4-only config on current omap-for-linus

Subsystems: arm port, the rest

STALE5643d

5 messages, 3 authors, 2011-03-01 · open the first message on its own page

[PATCH] OMAP2+: sdrc: fix compile break on OMAP4-only config on current omap-for-linus

From: paul@pwsan.com (Paul Walmsley)
Date: 2011-02-26 01:40:22

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 <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
---
 arch/arm/plat-omap/include/plat/sdrc.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-omap/include/plat/sdrc.h b/arch/arm/plat-omap/include/plat/sdrc.h
index efd87c8..5a44b14 100644
--- a/arch/arm/plat-omap/include/plat/sdrc.h
+++ b/arch/arm/plat-omap/include/plat/sdrc.h
@@ -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);
-- 
1.7.2.3

[PATCH] OMAP2+: sdrc: fix compile break on OMAP4-only config on current omap-for-linus

From: Sergei Shtylyov <hidden>
Date: 2011-02-26 15:05:52

Hello.

On 26-02-2011 4:40, Paul Walmsley wrote:
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<paul@pwsan.com>
Cc: Tony Lindgren<tony@atomide.com>
---
  arch/arm/plat-omap/include/plat/sdrc.h |    5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)
quoted hunk
diff --git a/arch/arm/plat-omap/include/plat/sdrc.h b/arch/arm/plat-omap/include/plat/sdrc.h
index efd87c8..5a44b14 100644
--- a/arch/arm/plat-omap/include/plat/sdrc.h
+++ b/arch/arm/plat-omap/include/plat/sdrc.h
@@ -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?
+#endif
+
WBR, Sergei

[PATCH] OMAP2+: sdrc: fix compile break on OMAP4-only config on current omap-for-linus

From: paul@pwsan.com (Paul Walmsley)
Date: 2011-02-28 00:03:14

Hello Sergei

On Sat, 26 Feb 2011, Sergei Shtylyov wrote:
   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 <paul@pwsan.com>
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 [off-list ref] for suggesting the use
of a empty static inline function rather than a macro.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Sergei Shtylyov <redacted>
---
 arch/arm/plat-omap/include/plat/sdrc.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-omap/include/plat/sdrc.h b/arch/arm/plat-omap/include/plat/sdrc.h
index efd87c8..2a34a65 100644
--- a/arch/arm/plat-omap/include/plat/sdrc.h
+++ b/arch/arm/plat-omap/include/plat/sdrc.h
@@ -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);
-- 
1.7.2.3

[PATCH] OMAP2+: sdrc: fix compile break on OMAP4-only config on current omap-for-linus

From: Sergei Shtylyov <hidden>
Date: 2011-02-28 11:49:06

Hello.

On 28-02-2011 3:03, Paul Walmsley wrote:
quoted
    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<paul@pwsan.com>
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 [off-list ref]  for suggesting the use
of a empty static inline function rather than a macro.
    Not at all. :-)
Signed-off-by: Paul Walmsley<paul@pwsan.com>
Cc: Tony Lindgren<tony@atomide.com>
Cc: Sergei Shtylyov<redacted>
---
  arch/arm/plat-omap/include/plat/sdrc.h |    6 ++++++
  1 files changed, 6 insertions(+), 0 deletions(-)
quoted hunk
diff --git a/arch/arm/plat-omap/include/plat/sdrc.h b/arch/arm/plat-omap/include/plat/sdrc.h
index efd87c8..2a34a65 100644
--- a/arch/arm/plat-omap/include/plat/sdrc.h
+++ b/arch/arm/plat-omap/include/plat/sdrc.h
@@ -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.
+					  struct omap_sdrc_params *sdrc_cs1) {};
+#endif
+
WBR, Sergei

[PATCH] OMAP2+: sdrc: fix compile break on OMAP4-only config on current omap-for-linus

From: tony@atomide.com (Tony Lindgren)
Date: 2011-03-01 01:58:18

* Sergei Shtylyov [off-list ref] [110228 03:48]:
On 28-02-2011 3:03, Paul Walmsley wrote:
quoted
Tony, do you want to take this one?
Applying..
 
quoted
+#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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help