public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [omap2] Fix compiler warnings in gpmc.c
@ 2008-10-10 10:19 Sanjeev Premi
  2008-10-10 11:27 ` Tony Lindgren
  0 siblings, 1 reply; 5+ messages in thread
From: Sanjeev Premi @ 2008-10-10 10:19 UTC (permalink / raw)
  To: linux-omap; +Cc: Sanjeev Premi

Fix these compiler warnings:

gpmc.c: In function 'gpmc_init':
gpmc.c:432: warning: 'return' with a value, in function returning void
gpmc.c:439: warning: 'return' with a value, in function returning void

Signed-off-by: Sanjeev Premi <premi@ti.com>
---
 arch/arm/mach-omap2/gpmc.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index f3e0271..4365c59 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -429,18 +429,16 @@ void __init gpmc_init(void)
 	gpmc_l3_clk = clk_get(NULL, ck);
 	if (IS_ERR(gpmc_l3_clk)) {
 		printk(KERN_ERR "Could not get GPMC clock %s\n", ck);
-		return -ENODEV;
+		BUG();
 	}
 
 	gpmc_base = ioremap(l, SZ_4K);
 	if (!gpmc_base) {
 		clk_put(gpmc_l3_clk);
 		printk(KERN_ERR "Could not get GPMC register memory\n");
-		return -ENOMEM;
+		BUG();
 	}
 
-	BUG_ON(IS_ERR(gpmc_l3_clk));
-
 	l = gpmc_read_reg(GPMC_REVISION);
 	printk(KERN_INFO "GPMC revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f);
 	/* Set smart idle mode and automatic L3 clock gating */
-- 
1.5.6


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

* Re: [PATCH] [omap2] Fix compiler warnings in gpmc.c
  2008-10-10 10:19 [PATCH] [omap2] Fix compiler warnings in gpmc.c Sanjeev Premi
@ 2008-10-10 11:27 ` Tony Lindgren
  2008-10-10 14:58   ` Pakaravoor, Jagadeesh
  0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2008-10-10 11:27 UTC (permalink / raw)
  To: Sanjeev Premi; +Cc: linux-omap

* Sanjeev Premi <premi@ti.com> [081010 13:22]:
> Fix these compiler warnings:
> 
> gpmc.c: In function 'gpmc_init':
> gpmc.c:432: warning: 'return' with a value, in function returning void
> gpmc.c:439: warning: 'return' with a value, in function returning void

Pushing.

Tony

> Signed-off-by: Sanjeev Premi <premi@ti.com>
> ---
>  arch/arm/mach-omap2/gpmc.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
> index f3e0271..4365c59 100644
> --- a/arch/arm/mach-omap2/gpmc.c
> +++ b/arch/arm/mach-omap2/gpmc.c
> @@ -429,18 +429,16 @@ void __init gpmc_init(void)
>  	gpmc_l3_clk = clk_get(NULL, ck);
>  	if (IS_ERR(gpmc_l3_clk)) {
>  		printk(KERN_ERR "Could not get GPMC clock %s\n", ck);
> -		return -ENODEV;
> +		BUG();
>  	}
>  
>  	gpmc_base = ioremap(l, SZ_4K);
>  	if (!gpmc_base) {
>  		clk_put(gpmc_l3_clk);
>  		printk(KERN_ERR "Could not get GPMC register memory\n");
> -		return -ENOMEM;
> +		BUG();
>  	}
>  
> -	BUG_ON(IS_ERR(gpmc_l3_clk));
> -
>  	l = gpmc_read_reg(GPMC_REVISION);
>  	printk(KERN_INFO "GPMC revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f);
>  	/* Set smart idle mode and automatic L3 clock gating */
> -- 
> 1.5.6
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCH] [omap2] Fix compiler warnings in gpmc.c
  2008-10-10 11:27 ` Tony Lindgren
@ 2008-10-10 14:58   ` Pakaravoor, Jagadeesh
  2008-10-11 15:00     ` Tony Lindgren
  0 siblings, 1 reply; 5+ messages in thread
From: Pakaravoor, Jagadeesh @ 2008-10-10 14:58 UTC (permalink / raw)
  To: Tony Lindgren, Premi, Sanjeev; +Cc: linux-omap@vger.kernel.org


What was wrong with this patch?

http://marc.info/?l=linux-omap&m=122277286326989&w=2

--
Jagadeesh


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

* Re: [PATCH] [omap2] Fix compiler warnings in gpmc.c
  2008-10-10 14:58   ` Pakaravoor, Jagadeesh
@ 2008-10-11 15:00     ` Tony Lindgren
  2008-10-16 21:16       ` Tony Lindgren
  0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2008-10-11 15:00 UTC (permalink / raw)
  To: Pakaravoor, Jagadeesh; +Cc: Premi, Sanjeev, linux-omap@vger.kernel.org

* Pakaravoor, Jagadeesh <j-pakaravoor@ti.com> [081010 17:58]:
> 
> What was wrong with this patch?
> 
> http://marc.info/?l=linux-omap&m=122277286326989&w=2

Hmm, looks like I forgot again we already had a patch for that, sorry :)
I'll take a better look on Tuesday.

Tony

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

* Re: [PATCH] [omap2] Fix compiler warnings in gpmc.c
  2008-10-11 15:00     ` Tony Lindgren
@ 2008-10-16 21:16       ` Tony Lindgren
  0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2008-10-16 21:16 UTC (permalink / raw)
  To: Pakaravoor, Jagadeesh; +Cc: Premi, Sanjeev, linux-omap@vger.kernel.org

* Tony Lindgren <tony@atomide.com> [081012 18:25]:
> * Pakaravoor, Jagadeesh <j-pakaravoor@ti.com> [081010 17:58]:
> > 
> > What was wrong with this patch?
> > 
> > http://marc.info/?l=linux-omap&m=122277286326989&w=2
> 
> Hmm, looks like I forgot again we already had a patch for that, sorry :)
> I'll take a better look on Tuesday.

Hmm, looks like your's is missing clk_put(), so let's keep what I
already pushed.

Cheers,

Tony

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

end of thread, other threads:[~2008-10-16 21:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-10 10:19 [PATCH] [omap2] Fix compiler warnings in gpmc.c Sanjeev Premi
2008-10-10 11:27 ` Tony Lindgren
2008-10-10 14:58   ` Pakaravoor, Jagadeesh
2008-10-11 15:00     ` Tony Lindgren
2008-10-16 21:16       ` Tony Lindgren

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