public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] misc. multi-omap compile fixes
@ 2010-01-28 17:17 Kevin Hilman
  2010-01-28 17:17 ` [PATCH 1/4] OMAP2/3: IRQ: ensure valid base address Kevin Hilman
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Kevin Hilman @ 2010-01-28 17:17 UTC (permalink / raw)
  To: linux-omap

This series fixes a few things preventing compile of omap3_defconfig
and also cleans up several new compiler warnings that were introduced.

Kevin Hilman (4):
  OMAP2/3: IRQ: ensure valid base address
  OMAP2/3: GPMC: ensure valid clock pointer
  OMAP2: clock: fix misc. OMAP24xx compile issues
  OMAP2/3: PRCM: fix misc. compiler warnings

 arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c |    8 ++++----
 arch/arm/mach-omap2/clock2xxx_data.c         |    2 +-
 arch/arm/mach-omap2/gpmc.c                   |    5 ++++-
 arch/arm/mach-omap2/irq.c                    |    4 +++-
 arch/arm/mach-omap2/prcm.c                   |    4 +++-
 5 files changed, 15 insertions(+), 8 deletions(-)


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/4] OMAP2/3: IRQ: ensure valid base address
  2010-01-28 17:17 [PATCH 0/4] misc. multi-omap compile fixes Kevin Hilman
@ 2010-01-28 17:17 ` Kevin Hilman
  2010-01-28 17:17 ` [PATCH 2/4] OMAP2/3: GPMC: ensure valid clock pointer Kevin Hilman
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Kevin Hilman @ 2010-01-28 17:17 UTC (permalink / raw)
  To: linux-omap

Ensure valid base address during IRQ init.  Fixes compiler warning
about potential use of uninitialized variable.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
 arch/arm/mach-omap2/irq.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 2705402..26aeef5 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -194,7 +194,7 @@ void __init omap_init_irq(void)
 	int i;
 
 	for (i = 0; i < ARRAY_SIZE(irq_banks); i++) {
-		unsigned long base;
+		unsigned long base = 0;
 		struct omap_irq_bank *bank = irq_banks + i;
 
 		if (cpu_is_omap24xx())
@@ -202,6 +202,8 @@ void __init omap_init_irq(void)
 		else if (cpu_is_omap34xx())
 			base = OMAP34XX_IC_BASE;
 
+		BUG_ON(!base);
+
 		/* Static mapping, never released */
 		bank->base_reg = ioremap(base, SZ_4K);
 		if (!bank->base_reg) {
-- 
1.6.6


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/4] OMAP2/3: GPMC: ensure valid clock pointer
  2010-01-28 17:17 [PATCH 0/4] misc. multi-omap compile fixes Kevin Hilman
  2010-01-28 17:17 ` [PATCH 1/4] OMAP2/3: IRQ: ensure valid base address Kevin Hilman
@ 2010-01-28 17:17 ` Kevin Hilman
  2010-01-28 17:22   ` Felipe Balbi
  2010-01-28 17:17 ` [PATCH 3/4] OMAP2: clock: fix misc. OMAP24xx compile issues Kevin Hilman
  2010-01-28 17:17 ` [PATCH 4/4] OMAP2/3: PRCM: fix misc. compiler warnings Kevin Hilman
  3 siblings, 1 reply; 8+ messages in thread
From: Kevin Hilman @ 2010-01-28 17:17 UTC (permalink / raw)
  To: linux-omap

Ensure valud clock pointer during GPMC init.  Fixes compiler
warning about potential use of uninitialized variable.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
 arch/arm/mach-omap2/gpmc.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 3f1334f..7027cdc 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -505,7 +505,7 @@ static void __init gpmc_mem_init(void)
 void __init gpmc_init(void)
 {
 	u32 l;
-	char *ck;
+	char *ck = NULL;
 
 	if (cpu_is_omap24xx()) {
 		ck = "core_l3_ck";
@@ -521,6 +521,9 @@ void __init gpmc_init(void)
 		l = OMAP44XX_GPMC_BASE;
 	}
 
+	if (WARN_ON(!ck))
+		return;
+
 	gpmc_l3_clk = clk_get(NULL, ck);
 	if (IS_ERR(gpmc_l3_clk)) {
 		printk(KERN_ERR "Could not get GPMC clock %s\n", ck);
-- 
1.6.6


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/4] OMAP2: clock: fix misc. OMAP24xx compile issues
  2010-01-28 17:17 [PATCH 0/4] misc. multi-omap compile fixes Kevin Hilman
  2010-01-28 17:17 ` [PATCH 1/4] OMAP2/3: IRQ: ensure valid base address Kevin Hilman
  2010-01-28 17:17 ` [PATCH 2/4] OMAP2/3: GPMC: ensure valid clock pointer Kevin Hilman
@ 2010-01-28 17:17 ` Kevin Hilman
  2010-01-28 17:17 ` [PATCH 4/4] OMAP2/3: PRCM: fix misc. compiler warnings Kevin Hilman
  3 siblings, 0 replies; 8+ messages in thread
From: Kevin Hilman @ 2010-01-28 17:17 UTC (permalink / raw)
  To: linux-omap

- Convert use of non-existant cpu_is_omap2xxx() to cpu_is_omap24xx()
- Change prefix of OMAP2 CPUfreq init/exit functions from
  omap2xxx_ to omap2_ as used in clock.c
- fix 'possible use of uninitialized variable' warning in
  omap2xxx_clk_init()

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
 arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c |    8 ++++----
 arch/arm/mach-omap2/clock2xxx_data.c         |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
index 7174d09..3b1eac4 100644
--- a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
+++ b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
@@ -177,14 +177,14 @@ int omap2_select_table_rate(struct clk *clk, unsigned long rate)
  */
 static struct cpufreq_frequency_table *freq_table;
 
-void omap2xxx_clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
+void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
 {
 	const struct prcm_config *prcm;
 	long sys_ck_rate;
 	int i = 0;
 	int tbl_sz = 0;
 
-	if (!cpu_is_omap2xxx())
+	if (!cpu_is_omap24xx())
 		return;
 
 	sys_ck_rate = clk_get_rate(sclk);
@@ -243,9 +243,9 @@ void omap2xxx_clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
 	*table = &freq_table[0];
 }
 
-void omap2xxx_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table)
+void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table)
 {
-	if (!cpu_is_omap2xxx())
+	if (!cpu_is_omap24xx())
 		return;
 
 	kfree(freq_table);
diff --git a/arch/arm/mach-omap2/clock2xxx_data.c b/arch/arm/mach-omap2/clock2xxx_data.c
index 52c7a6c..cd9156d 100644
--- a/arch/arm/mach-omap2/clock2xxx_data.c
+++ b/arch/arm/mach-omap2/clock2xxx_data.c
@@ -2243,7 +2243,7 @@ int __init omap2xxx_clk_init(void)
 	const struct prcm_config *prcm;
 	struct omap_clk *c;
 	u32 clkrate;
-	u16 cpu_clkflg;
+	u16 cpu_clkflg = 0;
 
 	if (cpu_is_omap242x()) {
 		prcm_clksrc_ctrl = OMAP2420_PRCM_CLKSRC_CTRL;
-- 
1.6.6


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/4] OMAP2/3: PRCM: fix misc. compiler warnings
  2010-01-28 17:17 [PATCH 0/4] misc. multi-omap compile fixes Kevin Hilman
                   ` (2 preceding siblings ...)
  2010-01-28 17:17 ` [PATCH 3/4] OMAP2: clock: fix misc. OMAP24xx compile issues Kevin Hilman
@ 2010-01-28 17:17 ` Kevin Hilman
  2010-02-05 20:29   ` Paul Walmsley
  3 siblings, 1 reply; 8+ messages in thread
From: Kevin Hilman @ 2010-01-28 17:17 UTC (permalink / raw)
  To: linux-omap

- missing return in omap_prcm_get_reset_sources()
- potential use of uninitialized variable in omap_prcm_arch_reset()

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
 arch/arm/mach-omap2/prcm.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index e8e121a..4b7286f 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -127,13 +127,15 @@ u32 omap_prcm_get_reset_sources(void)
 		return prm_read_mod_reg(WKUP_MOD, OMAP2_RM_RSTST) & 0x7f;
 	if (cpu_is_omap44xx())
 		return prm_read_mod_reg(WKUP_MOD, OMAP4_RM_RSTST) & 0x7f;
+
+	return 0;
 }
 EXPORT_SYMBOL(omap_prcm_get_reset_sources);
 
 /* Resets clock rates and reboots the system. Only called from system.h */
 void omap_prcm_arch_reset(char mode)
 {
-	s16 prcm_offs;
+	s16 prcm_offs = 0;
 
 	if (cpu_is_omap24xx()) {
 		omap2xxx_clk_prepare_for_reboot();
-- 
1.6.6


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/4] OMAP2/3: GPMC: ensure valid clock pointer
  2010-01-28 17:17 ` [PATCH 2/4] OMAP2/3: GPMC: ensure valid clock pointer Kevin Hilman
@ 2010-01-28 17:22   ` Felipe Balbi
  2010-01-28 23:24     ` Tony Lindgren
  0 siblings, 1 reply; 8+ messages in thread
From: Felipe Balbi @ 2010-01-28 17:22 UTC (permalink / raw)
  To: ext Kevin Hilman; +Cc: linux-omap@vger.kernel.org

On Thu, Jan 28, 2010 at 06:17:14PM +0100, ext Kevin Hilman wrote:
>Ensure valud clock pointer during GPMC init.  Fixes compiler
            ^ typo :-)

-- 
balbi

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/4] OMAP2/3: GPMC: ensure valid clock pointer
  2010-01-28 17:22   ` Felipe Balbi
@ 2010-01-28 23:24     ` Tony Lindgren
  0 siblings, 0 replies; 8+ messages in thread
From: Tony Lindgren @ 2010-01-28 23:24 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: ext Kevin Hilman, linux-omap@vger.kernel.org

* Felipe Balbi <felipe.balbi@nokia.com> [100128 09:24]:
> On Thu, Jan 28, 2010 at 06:17:14PM +0100, ext Kevin Hilman wrote:
> >Ensure valud clock pointer during GPMC init.  Fixes compiler
>            ^ typo :-)

Adding the first two to omap-fixes, also fixed this typo.

Adding the last to master branch, we have to wait for Paul
to merge those into his branch and then redo omap-for-linus.

Tony

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/4] OMAP2/3: PRCM: fix misc. compiler warnings
  2010-01-28 17:17 ` [PATCH 4/4] OMAP2/3: PRCM: fix misc. compiler warnings Kevin Hilman
@ 2010-02-05 20:29   ` Paul Walmsley
  0 siblings, 0 replies; 8+ messages in thread
From: Paul Walmsley @ 2010-02-05 20:29 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-omap

On Thu, 28 Jan 2010, Kevin Hilman wrote:

> - missing return in omap_prcm_get_reset_sources()
> - potential use of uninitialized variable in omap_prcm_arch_reset()
> 
> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>

Thanks, queued for 2.6.34.


- Paul

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-02-05 20:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-28 17:17 [PATCH 0/4] misc. multi-omap compile fixes Kevin Hilman
2010-01-28 17:17 ` [PATCH 1/4] OMAP2/3: IRQ: ensure valid base address Kevin Hilman
2010-01-28 17:17 ` [PATCH 2/4] OMAP2/3: GPMC: ensure valid clock pointer Kevin Hilman
2010-01-28 17:22   ` Felipe Balbi
2010-01-28 23:24     ` Tony Lindgren
2010-01-28 17:17 ` [PATCH 3/4] OMAP2: clock: fix misc. OMAP24xx compile issues Kevin Hilman
2010-01-28 17:17 ` [PATCH 4/4] OMAP2/3: PRCM: fix misc. compiler warnings Kevin Hilman
2010-02-05 20:29   ` Paul Walmsley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox