public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] power management: remove some useless code from arm platforms
@ 2007-04-26 16:16 Johannes Berg
  2007-04-26 21:12 ` Dmitry Krivoschekov
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2007-04-26 16:16 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-pm

This patch kills some useless code omap1/omap2.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

---
 arch/arm/mach-omap1/pm.c |   36 ++++++------------------------------
 arch/arm/mach-omap2/pm.c |   38 ++++++--------------------------------
 2 files changed, 12 insertions(+), 62 deletions(-)

--- wireless-dev.orig/arch/arm/mach-omap1/pm.c	2007-04-26 17:23:20.263249310 +0200
+++ wireless-dev/arch/arm/mach-omap1/pm.c	2007-04-26 17:28:00.003249310 +0200
@@ -620,26 +620,11 @@ static void (*saved_idle)(void) = NULL;
  */
 static int omap_pm_prepare(suspend_state_t state)
 {
-	int error = 0;
-
 	/* We cannot sleep in idle until we have resumed */
 	saved_idle = pm_idle;
 	pm_idle = NULL;
 
-	switch (state)
-	{
-	case PM_SUSPEND_STANDBY:
-	case PM_SUSPEND_MEM:
-		break;
-
-	case PM_SUSPEND_DISK:
-		return -ENOTSUPP;
-
-	default:
-		return -EINVAL;
-	}
-
-	return error;
+	return 0;
 }
 
 
@@ -651,20 +636,11 @@ static int omap_pm_prepare(suspend_state
 
 static int omap_pm_enter(suspend_state_t state)
 {
-	switch (state)
-	{
-	case PM_SUSPEND_STANDBY:
-	case PM_SUSPEND_MEM:
-		omap_pm_suspend();
-		break;
-
-	case PM_SUSPEND_DISK:
-		return -ENOTSUPP;
-
-	default:
-		return -EINVAL;
-	}
-
+	/*
+	 * since we mark only "mem" as valid
+	 * there's no need to check "state" here
+	 */
+	omap_pm_suspend();
 	return 0;
 }
 
--- wireless-dev.orig/arch/arm/mach-omap2/pm.c	2007-04-26 17:23:20.403249310 +0200
+++ wireless-dev/arch/arm/mach-omap2/pm.c	2007-04-26 17:28:20.323249310 +0200
@@ -73,26 +73,11 @@ void omap2_pm_idle(void)
 
 static int omap2_pm_prepare(suspend_state_t state)
 {
-	int error = 0;
-
 	/* We cannot sleep in idle until we have resumed */
 	saved_idle = pm_idle;
 	pm_idle = NULL;
 
-	switch (state)
-	{
-	case PM_SUSPEND_STANDBY:
-	case PM_SUSPEND_MEM:
-		break;
-
-	case PM_SUSPEND_DISK:
-		return -ENOTSUPP;
-
-	default:
-		return -EINVAL;
-	}
-
-	return error;
+	return 0;
 }
 
 #define INT0_WAKE_MASK	(OMAP_IRQ_BIT(INT_24XX_GPIO_BANK1) |	\
@@ -345,22 +330,11 @@ static int omap2_pm_suspend(void)
 
 static int omap2_pm_enter(suspend_state_t state)
 {
-	int ret = 0;
-
-	switch (state)
-	{
-	case PM_SUSPEND_STANDBY:
-	case PM_SUSPEND_MEM:
-		ret = omap2_pm_suspend();
-		break;
-	case PM_SUSPEND_DISK:
-		ret = -ENOTSUPP;
-		break;
-	default:
-		ret = -EINVAL;
-	}
-
-	return ret;
+	/*
+	 * since we mark only 'mem' as valid, there's
+	 * no need to check 'state' here
+	 */
+	return omap2_pm_suspend();
 }
 
 static int omap2_pm_finish(suspend_state_t state)

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

* Re: [PATCH] power management: remove some useless code from arm platforms
  2007-04-26 16:16 [PATCH] power management: remove some useless code from arm platforms Johannes Berg
@ 2007-04-26 21:12 ` Dmitry Krivoschekov
  2007-04-27  9:38   ` Johannes Berg
  2007-04-28  0:53   ` Andrew Morton
  0 siblings, 2 replies; 6+ messages in thread
From: Dmitry Krivoschekov @ 2007-04-26 21:12 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Andrew Morton, linux-omap-open-source, linux-pm

Johannes Berg wrote:
> This patch kills some useless code omap1/omap2.
Although the change looks harmless it'd be nice  CC-ing
appropriate "arch" or "mach" lists.

Added omap list to CC.

BTW, you change OMAP stuff only, so your subject is slightly irrelevant.


Regards,
Dmitry
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
>
> ---
>  arch/arm/mach-omap1/pm.c |   36 ++++++------------------------------
>  arch/arm/mach-omap2/pm.c |   38 ++++++--------------------------------
>  2 files changed, 12 insertions(+), 62 deletions(-)
>
> --- wireless-dev.orig/arch/arm/mach-omap1/pm.c	2007-04-26 17:23:20.263249310 +0200
> +++ wireless-dev/arch/arm/mach-omap1/pm.c	2007-04-26 17:28:00.003249310 +0200
> @@ -620,26 +620,11 @@ static void (*saved_idle)(void) = NULL;
>   */
>  static int omap_pm_prepare(suspend_state_t state)
>  {
> -	int error = 0;
> -
>  	/* We cannot sleep in idle until we have resumed */
>  	saved_idle = pm_idle;
>  	pm_idle = NULL;
>  
> -	switch (state)
> -	{
> -	case PM_SUSPEND_STANDBY:
> -	case PM_SUSPEND_MEM:
> -		break;
> -
> -	case PM_SUSPEND_DISK:
> -		return -ENOTSUPP;
> -
> -	default:
> -		return -EINVAL;
> -	}
> -
> -	return error;
> +	return 0;
>  }
>  
>  
> @@ -651,20 +636,11 @@ static int omap_pm_prepare(suspend_state
>  
>  static int omap_pm_enter(suspend_state_t state)
>  {
> -	switch (state)
> -	{
> -	case PM_SUSPEND_STANDBY:
> -	case PM_SUSPEND_MEM:
> -		omap_pm_suspend();
> -		break;
> -
> -	case PM_SUSPEND_DISK:
> -		return -ENOTSUPP;
> -
> -	default:
> -		return -EINVAL;
> -	}
> -
> +	/*
> +	 * since we mark only "mem" as valid
> +	 * there's no need to check "state" here
> +	 */
> +	omap_pm_suspend();
>  	return 0;
>  }
>  
> --- wireless-dev.orig/arch/arm/mach-omap2/pm.c	2007-04-26 17:23:20.403249310 +0200
> +++ wireless-dev/arch/arm/mach-omap2/pm.c	2007-04-26 17:28:20.323249310 +0200
> @@ -73,26 +73,11 @@ void omap2_pm_idle(void)
>  
>  static int omap2_pm_prepare(suspend_state_t state)
>  {
> -	int error = 0;
> -
>  	/* We cannot sleep in idle until we have resumed */
>  	saved_idle = pm_idle;
>  	pm_idle = NULL;
>  
> -	switch (state)
> -	{
> -	case PM_SUSPEND_STANDBY:
> -	case PM_SUSPEND_MEM:
> -		break;
> -
> -	case PM_SUSPEND_DISK:
> -		return -ENOTSUPP;
> -
> -	default:
> -		return -EINVAL;
> -	}
> -
> -	return error;
> +	return 0;
>  }
>  
>  #define INT0_WAKE_MASK	(OMAP_IRQ_BIT(INT_24XX_GPIO_BANK1) |	\
> @@ -345,22 +330,11 @@ static int omap2_pm_suspend(void)
>  
>  static int omap2_pm_enter(suspend_state_t state)
>  {
> -	int ret = 0;
> -
> -	switch (state)
> -	{
> -	case PM_SUSPEND_STANDBY:
> -	case PM_SUSPEND_MEM:
> -		ret = omap2_pm_suspend();
> -		break;
> -	case PM_SUSPEND_DISK:
> -		ret = -ENOTSUPP;
> -		break;
> -	default:
> -		ret = -EINVAL;
> -	}
> -
> -	return ret;
> +	/*
> +	 * since we mark only 'mem' as valid, there's
> +	 * no need to check 'state' here
> +	 */
> +	return omap2_pm_suspend();
>  }
>  
>  static int omap2_pm_finish(suspend_state_t state)
>
>
> _______________________________________________
> linux-pm mailing list
> linux-pm@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/linux-pm
>

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

* Re: [PATCH] power management: remove some useless code from arm platforms
  2007-04-26 21:12 ` Dmitry Krivoschekov
@ 2007-04-27  9:38   ` Johannes Berg
  2007-04-28  0:53   ` Andrew Morton
  1 sibling, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2007-04-27  9:38 UTC (permalink / raw)
  To: Dmitry Krivoschekov; +Cc: Andrew Morton, linux-omap-open-source, linux-pm


[-- Attachment #1.1: Type: text/plain, Size: 491 bytes --]

On Fri, 2007-04-27 at 01:12 +0400, Dmitry Krivoschekov wrote:
> Johannes Berg wrote:
> > This patch kills some useless code omap1/omap2.
> Although the change looks harmless it'd be nice  CC-ing
> appropriate "arch" or "mach" lists.

Sorry.

> Added omap list to CC.

Thanks.

> BTW, you change OMAP stuff only, so your subject is slightly irrelevant.

Uh, yeah, I wanted to change axn4008 or whatever it's called in the same
patch and then thought better of it.

johannes

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] power management: remove some useless code from arm platforms
  2007-04-26 21:12 ` Dmitry Krivoschekov
  2007-04-27  9:38   ` Johannes Berg
@ 2007-04-28  0:53   ` Andrew Morton
  2007-04-28  3:41     ` Tony Lindgren
  1 sibling, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2007-04-28  0:53 UTC (permalink / raw)
  To: Dmitry Krivoschekov, Tony Lindgren
  Cc: Johannes Berg, linux-omap-open-source, linux-pm

On Fri, 27 Apr 2007 01:12:26 +0400
Dmitry Krivoschekov <dmitry.krivoschekov@gmail.com> wrote:

> Johannes Berg wrote:
> > This patch kills some useless code omap1/omap2.
> Although the change looks harmless it'd be nice  CC-ing
> appropriate "arch" or "mach" lists.
> 
> Added omap list to CC.
> 
> BTW, you change OMAP stuff only, so your subject is slightly irrelevant.
> 

I'm not very comfortable handling OMAP code (Tony), ARM code (Russell) or
power-management code (Greg), and this patch is all three.

So ho hum.  I queued it up with Greg as the arbitrary target, but I'm not
sure that is really appopriate.  Probably it should have been Tony, but
Tony's tree is hiding from me.

I guess we should look at dragging the OMAP git tree into -mm.

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

* Re: [PATCH] power management: remove some useless code from arm platforms
  2007-04-28  0:53   ` Andrew Morton
@ 2007-04-28  3:41     ` Tony Lindgren
  2007-05-02  3:48       ` Tony Lindgren
  0 siblings, 1 reply; 6+ messages in thread
From: Tony Lindgren @ 2007-04-28  3:41 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Russell King, Johannes Berg, linux-omap-open-source, linux-pm

Hi,

* Andrew Morton <akpm@linux-foundation.org> [070428 00:53]:
> On Fri, 27 Apr 2007 01:12:26 +0400
> Dmitry Krivoschekov <dmitry.krivoschekov@gmail.com> wrote:
> 
> > Johannes Berg wrote:
> > > This patch kills some useless code omap1/omap2.
> > Although the change looks harmless it'd be nice  CC-ing
> > appropriate "arch" or "mach" lists.
> > 
> > Added omap list to CC.
> > 
> > BTW, you change OMAP stuff only, so your subject is slightly irrelevant.
> > 
> 
> I'm not very comfortable handling OMAP code (Tony), ARM code (Russell) or
> power-management code (Greg), and this patch is all three.

Well this patch will probably cause some minor merge conflicts with the
pending omap patches, not a big deal though.

> So ho hum.  I queued it up with Greg as the arbitrary target, but I'm not
> sure that is really appopriate.  Probably it should have been Tony, but
> Tony's tree is hiding from me.

The omap tree is available at [1] and the currently pending patches
pile at [2].

> I guess we should look at dragging the OMAP git tree into -mm.

I thought Russell is about to apply the pending omap patches to his
tree, so let's wait until we hear from him.

Assuming Russell applies the pending omap patches, things should
be pretty much in sync with the mainline tree and linux-omap tree for
the core omap support.

There will be some driver and PM patches that would fit to -mm tree
though. At least the voltage framework, and possibly the DSP code later
on, come to mind.

Regards,

Tony

[1] git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
[2] git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git omap-upstream-after-clocksource

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

* Re: [PATCH] power management: remove some useless code from arm platforms
  2007-04-28  3:41     ` Tony Lindgren
@ 2007-05-02  3:48       ` Tony Lindgren
  0 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2007-05-02  3:48 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Russell King, Johannes Berg, linux-omap-open-source, linux-pm

* Tony Lindgren <tony@atomide.com> [070428 03:41]:
> Hi,
> 
> * Andrew Morton <akpm@linux-foundation.org> [070428 00:53]:
> > On Fri, 27 Apr 2007 01:12:26 +0400
> > Dmitry Krivoschekov <dmitry.krivoschekov@gmail.com> wrote:
> > 
> > > Johannes Berg wrote:
> > > > This patch kills some useless code omap1/omap2.
> > > Although the change looks harmless it'd be nice  CC-ing
> > > appropriate "arch" or "mach" lists.
> > > 
> > > Added omap list to CC.
> > > 
> > > BTW, you change OMAP stuff only, so your subject is slightly irrelevant.
> > > 
> > 
> > I'm not very comfortable handling OMAP code (Tony), ARM code (Russell) or
> > power-management code (Greg), and this patch is all three.
> 
> Well this patch will probably cause some minor merge conflicts with the
> pending omap patches, not a big deal though.

Looks like the omap pile still applies fine after Johannes' patches,
so no merge issue there :)

> > So ho hum.  I queued it up with Greg as the arbitrary target, but I'm not
> > sure that is really appopriate.  Probably it should have been Tony, but
> > Tony's tree is hiding from me.
> 
> The omap tree is available at [1] and the currently pending patches
> pile at [2].
> 
> > I guess we should look at dragging the OMAP git tree into -mm.
> 
> I thought Russell is about to apply the pending omap patches to his
> tree, so let's wait until we hear from him.
> 
> Assuming Russell applies the pending omap patches, things should
> be pretty much in sync with the mainline tree and linux-omap tree for
> the core omap support.
> 
> There will be some driver and PM patches that would fit to -mm tree
> though. At least the voltage framework, and possibly the DSP code later
> on, come to mind.
> 
> Regards,
> 
> Tony
> 
> [1] git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
> [2] git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git omap-upstream-after-clocksource

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

end of thread, other threads:[~2007-05-02  3:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-26 16:16 [PATCH] power management: remove some useless code from arm platforms Johannes Berg
2007-04-26 21:12 ` Dmitry Krivoschekov
2007-04-27  9:38   ` Johannes Berg
2007-04-28  0:53   ` Andrew Morton
2007-04-28  3:41     ` Tony Lindgren
2007-05-02  3:48       ` Tony Lindgren

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