Skip to contentSkip to conversation

ARM: PM: Drop useless checks for PM_SUSPEND_STANDBY

PATCH New Geert Uytterhoeven 5 participants 10 messages Feb 17, 2017 – Mar 6, 2017

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

cover ARM: PM: Drop useless checks for PM_SUSPEND_STANDBY

Hi all,

The system suspend implementations for DaVinci, OMAP, and SoCFPGA use the standard suspend_valid_only_mem() for their platform_suspend_ops.valid() callbacks. Hence their platform_suspend_ops.enter() callbacks will never be called with state equal to PM_SUSPEND_STANDBY, and checks for this can thus be removed.

Thanks for your comments!

Geert Uytterhoeven (3):
ARM: davinci: PM: Drop useless check for PM_SUSPEND_STANDBY
ARM: OMAP: PM: Drop useless check for PM_SUSPEND_STANDBY
ARM: socfpga: PM: Drop useless check for PM_SUSPEND_STANDBY

 arch/arm/mach-davinci/pm.c | 1 -
 arch/arm/mach-omap1/pm.c   | 1 -
 arch/arm/mach-omap2/pm.c   | 1 -
 arch/arm/mach-socfpga/pm.c | 1 -
 4 files changed, 4 deletions(-)
Signature · 12 lines
1.9.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
#1 lore raw

PATCH 1/3 ARM: davinci: PM: Drop useless check for PM_SUSPEND_STANDBY

As DaVinci uses the standard suspend_valid_only_mem() for its platform_suspend_ops.valid() callback, its platform_suspend_ops.enter() callback will never be called with state equal to PM_SUSPEND_STANDBY.

---
 arch/arm/mach-davinci/pm.c | 1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-davinci/pm.c +0 -1
index 0afd201ab980464c..efb80354f3034d85 100644
@@ -108,7 +108,6 @@ static int davinci_pm_enter(suspend_state_t state)
 	int ret = 0;
 
 	switch (state) {
-	case PM_SUSPEND_STANDBY:
 	case PM_SUSPEND_MEM:
 		davinci_pm_suspend();
 		break;
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/3 ARM: davinci: PM: Drop useless check for PM_SUSPEND_STANDBY

Quoted 5 lines · Geert Uytterhoeven

As DaVinci uses the standard suspend_valid_only_mem() for its platform_suspend_ops.valid() callback, its platform_suspend_ops.enter() callback will never be called with state equal to PM_SUSPEND_STANDBY.

Looks good to me. Whats the plan for applying the series. Do you want the individual machine maintainers to apply their parts. Or some other?

Thanks,
Sekhar

#3 lore raw

PATCH 1/3 ARM: davinci: PM: Drop useless check for PM_SUSPEND_STANDBY

Hi Sekhar,

Quoted 9 lines · Sekhar Nori
Quoted 5 lines · Geert Uytterhoeven

As DaVinci uses the standard suspend_valid_only_mem() for its platform_suspend_ops.valid() callback, its platform_suspend_ops.enter() callback will never be called with state equal to PM_SUSPEND_STANDBY.

Looks good to me. Whats the plan for applying the series. Do you want the individual machine maintainers to apply their parts. Or some other?

I think the individual machine maintainers is the simplest.

Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#4 lore raw

PATCH 1/3 ARM: davinci: PM: Drop useless check for PM_SUSPEND_STANDBY

Quoted 8 lines · Geert Uytterhoeven

Hi Sekhar,

Quoted 5 lines · Sekhar Nori
Quoted 4 lines · Geert Uytterhoeven

As DaVinci uses the standard suspend_valid_only_mem() for its platform_suspend_ops.valid() callback, its platform_suspend_ops.enter() callback will never be called with state equal to PM_SUSPEND_STANDBY.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Looks good to me. Whats the plan for applying the series. Do you want the individual machine maintainers to apply their parts. Or some other?

I think the individual machine maintainers is the simplest.

Patch 1/3 applied to branch v4.12/soc of my tree.

Thanks,
Sekhar

#5 lore raw

PATCH 2/3 ARM: OMAP: PM: Drop useless checks for PM_SUSPEND_STANDBY

In reply to Geert Uytterhoeven

As OMAP uses the standard suspend_valid_only_mem() for its platform_suspend_ops.valid() callback, its platform_suspend_ops.enter() callback will never be called with state equal to PM_SUSPEND_STANDBY.

---
 arch/arm/mach-omap1/pm.c | 1 -
 arch/arm/mach-omap2/pm.c | 1 -
 2 files changed, 2 deletions(-)
arch/arm/mach-omap1/pm.c +0 -1
index ee5460b8ec2ee6e9..f1135bf8940ed82d 100644
@@ -581,7 +581,6 @@ static int omap_pm_enter(suspend_state_t state)
 {
 	switch (state)
 	{
-	case PM_SUSPEND_STANDBY:
 	case PM_SUSPEND_MEM:
 		omap1_pm_suspend();
 		break;
arch/arm/mach-omap2/pm.c +0 -1
index 0598630c17786242..63027e60cc209f1c 100644
@@ -163,7 +163,6 @@ static int omap_pm_enter(suspend_state_t suspend_state)
 		return -ENOENT; /* XXX doublecheck */
 
 	switch (suspend_state) {
-	case PM_SUSPEND_STANDBY:
 	case PM_SUSPEND_MEM:
 		ret = omap_pm_suspend();
 		break;
Signature · 1 line
1.9.1
#6 lore raw

PATCH 3/3 ARM: socfpga: PM: Drop useless check for PM_SUSPEND_STANDBY

In reply to Geert Uytterhoeven

As SoCFPGA uses the standard suspend_valid_only_mem() for its platform_suspend_ops.valid() callback, its platform_suspend_ops.enter() callback will never be called with state equal to PM_SUSPEND_STANDBY.

---
 arch/arm/mach-socfpga/pm.c | 1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-socfpga/pm.c +0 -1
index c378ab0c24317ccf..d4866788702cb87a 100644
@@ -116,7 +116,6 @@ static int socfpga_pm_suspend(unsigned long arg)
 static int socfpga_pm_enter(suspend_state_t state)
 {
 	switch (state) {
-	case PM_SUSPEND_STANDBY:
 	case PM_SUSPEND_MEM:
 		outer_disable();
 		cpu_suspend(0, socfpga_pm_suspend);
Signature · 1 line
1.9.1
maintainer
#7 lore raw

PATCH 3/3 ARM: socfpga: PM: Drop useless check for PM_SUSPEND_STANDBY

Quoted 15 lines · Geert Uytterhoeven

As SoCFPGA uses the standard suspend_valid_only_mem() for its platform_suspend_ops.valid() callback, its platform_suspend_ops.enter() callback will never be called with state equal to PM_SUSPEND_STANDBY.

---
 arch/arm/mach-socfpga/pm.c | 1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-socfpga/pm.c +0 -0
index c378ab0c24317ccf..d4866788702cb87a 100644

arch/arm/mach-socfpga/pm.c static int socfpga_pm_suspend(unsigned long arg) · line 121

Quoted 7 lines
arch/arm/mach-socfpga/pm.c +0 -1
@@ -116,7 +116,6 @@ static int socfpga_pm_suspend(unsigned long arg)
 static int socfpga_pm_enter(suspend_state_t state)
 {
 	switch (state) {
-	case PM_SUSPEND_STANDBY:
 	case PM_SUSPEND_MEM:
 		outer_disable();
 		cpu_suspend(0, socfpga_pm_suspend);

Dinh

maintainer
#8 lore raw

cover ARM: PM: Drop useless checks for PM_SUSPEND_STANDBY

In reply to Geert Uytterhoeven
Quoted 9 lines · Geert Uytterhoeven

Hi all,

The system suspend implementations for DaVinci, OMAP, and SoCFPGA use the standard suspend_valid_only_mem() for their platform_suspend_ops.valid() callbacks. Hence their platform_suspend_ops.enter() callbacks will never be called with state equal to PM_SUSPEND_STANDBY, and checks for this can thus be removed.

Thanks for your comments!

Seems safe to remove:

Quoted 24 lines

Geert Uytterhoeven (3):
ARM: davinci: PM: Drop useless check for PM_SUSPEND_STANDBY
ARM: OMAP: PM: Drop useless check for PM_SUSPEND_STANDBY
ARM: socfpga: PM: Drop useless check for PM_SUSPEND_STANDBY

 arch/arm/mach-davinci/pm.c | 1 -
 arch/arm/mach-omap1/pm.c   | 1 -
 arch/arm/mach-omap2/pm.c   | 1 -
 arch/arm/mach-socfpga/pm.c | 1 -
 4 files changed, 4 deletions(-)
Signature · 12 lines
1.9.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
maintainer
#9 lore raw

cover ARM: PM: Drop useless checks for PM_SUSPEND_STANDBY

Quoted 9 lines · Tony Lindgren
Quoted 8 lines · Geert Uytterhoeven

Hi all,

The system suspend implementations for DaVinci, OMAP, and SoCFPGA use the standard suspend_valid_only_mem() for their platform_suspend_ops.valid() callbacks. Hence their platform_suspend_ops.enter() callbacks will never be called with state equal to PM_SUSPEND_STANDBY, and checks for this can thus be removed.

Quoted 5 lines
Quoted 1 line

Thanks for your comments!

Seems safe to remove:

Sounds like you wanted me to pick this up so applying the omap related patch into omap-for-v4.12/soc.

Thanks,

Tony