Skip to contentSkip to conversation

pm: remove unused asm/suspend.h

PATCH Applied Magnus Damm 3 participants 8 messages May 12, 2009 – May 14, 2009

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

PATCH 1/1 pm: remove unused asm/suspend.h

From: Magnus Damm <[email protected]>

This patch removes unused asm/suspend.h files for
the following architectures:

alpha, arm, ia64, m68k, mips, s390, um

---

 arch/alpha/include/asm/suspend.h |    6 ------
 arch/arm/include/asm/suspend.h   |    4 ----
 arch/ia64/include/asm/suspend.h  |    1 -
 arch/m68k/include/asm/suspend.h  |    6 ------
 arch/mips/include/asm/suspend.h  |    6 ------
 arch/s390/include/asm/suspend.h  |    5 -----
 arch/um/include/asm/suspend.h    |    4 ----
 7 files changed, 32 deletions(-)
arch/alpha/include/asm/suspend.h deleted +0 -6
@@ -1,6 +0,0 @@
-#ifndef __ALPHA_SUSPEND_H
-#define __ALPHA_SUSPEND_H
-
-/* Dummy include. */
-
-#endif  /* __ALPHA_SUSPEND_H */
arch/arm/include/asm/suspend.h deleted +0 -4
@@ -1,4 +0,0 @@
-#ifndef _ASMARM_SUSPEND_H
-#define _ASMARM_SUSPEND_H
-
-#endif
arch/ia64/include/asm/suspend.h deleted +0 -1
@@ -1 +0,0 @@
-/* dummy (must be non-empty to prevent prejudicial removal...) */
arch/m68k/include/asm/suspend.h deleted +0 -6
@@ -1,6 +0,0 @@
-#ifndef _M68K_SUSPEND_H
-#define _M68K_SUSPEND_H
-
-/* Dummy include. */
-
-#endif  /* _M68K_SUSPEND_H */
arch/mips/include/asm/suspend.h deleted +0 -6
@@ -1,6 +0,0 @@
-#ifndef __ASM_SUSPEND_H
-#define __ASM_SUSPEND_H
-
-/* Somewhen...  Maybe :-)  */
-
-#endif /* __ASM_SUSPEND_H */
arch/s390/include/asm/suspend.h deleted +0 -5
@@ -1,5 +0,0 @@
-#ifndef __ASM_S390_SUSPEND_H
-#define __ASM_S390_SUSPEND_H
-
-#endif
-
arch/um/include/asm/suspend.h deleted +0 -4
@@ -1,4 +0,0 @@
-#ifndef __UM_SUSPEND_H
-#define __UM_SUSPEND_H
-
-#endif
#1 lore raw
Quoted 9 lines · Magnus Damm

From: Magnus Damm <[email protected]>

This patch removes unused asm/suspend.h files for
the following architectures:

alpha, arm, ia64, m68k, mips, s390, um

Are you sure? arm does support suspend...
Pavel

Quoted 7 lines
arch/arm/include/asm/suspend.h deleted +0 -4
@@ -1,4 +0,0 @@
-#ifndef _ASMARM_SUSPEND_H
-#define _ASMARM_SUSPEND_H
-
-#endif
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#2 lore raw

Hi Pavel,

Quoted 4 lines · Pavel Machek
Quoted 3 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Quoted 8 lines
Quoted 6 lines

This patch removes unused asm/suspend.h files for
the following architectures:

 alpha, arm, ia64, m68k, mips, s390, um

Are you sure? arm does support suspend...

Not sure, but these days <asm/suspend.h> is only included from kernel/power/disk.c. And that file is only built if CONFIG_HIBERNATION is set. I've grepped for arch_prepare_suspend and ARCH_HIBERNATION_POSSIBLE but I don't get any matches under arch/arm...

Or am I misunderstanding? =)

Cheers,

/ magnus

#3 lore raw
Quoted 16 lines · Magnus Damm

Hi Pavel,

Quoted 4 lines · Pavel Machek
Quoted 3 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Quoted 8 lines
Quoted 6 lines

This patch removes unused asm/suspend.h files for
the following architectures:

alpha, arm, ia64, m68k, mips, s390, um

Are you sure? arm does support suspend...

Quoted 7 lines

Not sure, but these days <asm/suspend.h> is only included from kernel/power/disk.c. And that file is only built if CONFIG_HIBERNATION is set. I've grepped for arch_prepare_suspend and ARCH_HIBERNATION_POSSIBLE but I don't get any matches under arch/arm...

Or am I misunderstanding? =)

Sounds reasonable, but have you actually tested compilation on the architectures you're changing?

Rafael

#4 lore raw
Quoted 21 lines · Rafael J. Wysocki
Quoted 20 lines · Magnus Damm
Quoted 4 lines · Pavel Machek
Quoted 3 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Quoted 8 lines
Quoted 6 lines

This patch removes unused asm/suspend.h files for
the following architectures:

 alpha, arm, ia64, m68k, mips, s390, um

Are you sure? arm does support suspend...

Not sure, but these days <asm/suspend.h> is only included from kernel/power/disk.c. And that file is only built if CONFIG_HIBERNATION is set. I've grepped for arch_prepare_suspend and ARCH_HIBERNATION_POSSIBLE but I don't get any matches under arch/arm...

Quoted 4 lines
Quoted 1 line

Or am I misunderstanding? =)

Sounds reasonable, but have you actually tested compilation on the architectures you're changing?

No, I have not. However, grepping shows that it's pretty safe:

$ find . | xargs grep asm/suspend

(files in arch/powerpc, arch/x86, arch/sh and kernel/power/disk.c)

Basically, the patch is doing further cleanups on top of:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a8af78982ff4c0b3731527b0217d286a343a3089

Since that patch is included upstream already it is safe to assume that <asm/suspend.h> is only needed by architectures setting ARCH_HIBERNATION_POSSIBLE. Which means powerpc, x86 and sh. The rest of the header files can go away.

Still want me to compile test for all architectures affected?

Thanks,

/ magnus

Acked-by
#6 lore raw
In reply to Magnus Damm
Quoted 16 lines · Magnus Damm

Hi Pavel,

Quoted 4 lines · Pavel Machek
Quoted 3 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Quoted 8 lines
Quoted 6 lines

This patch removes unused asm/suspend.h files for
the following architectures:

 alpha, arm, ia64, m68k, mips, s390, um

Are you sure? arm does support suspend...

Quoted 7 lines

Not sure, but these days <asm/suspend.h> is only included from kernel/power/disk.c. And that file is only built if CONFIG_HIBERNATION is set. I've grepped for arch_prepare_suspend and ARCH_HIBERNATION_POSSIBLE but I don't get any matches under arch/arm...

Or am I misunderstanding? =)

I did rm arch/arm/include/asm/suspend.h and ran test compile on zaurus; it seems ok. Because no other architectures are close to supporting suspend/hibernation, I think I can

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#5 lore raw
In reply to Magnus Damm
Quoted 35 lines · Magnus Damm
Quoted 21 lines · Rafael J. Wysocki
Quoted 20 lines · Magnus Damm
Quoted 4 lines · Pavel Machek
Quoted 3 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Quoted 8 lines
Quoted 6 lines

This patch removes unused asm/suspend.h files for
the following architectures:

alpha, arm, ia64, m68k, mips, s390, um

Are you sure? arm does support suspend...

Not sure, but these days <asm/suspend.h> is only included from kernel/power/disk.c. And that file is only built if CONFIG_HIBERNATION is set. I've grepped for arch_prepare_suspend and ARCH_HIBERNATION_POSSIBLE but I don't get any matches under arch/arm...

Quoted 4 lines
Quoted 1 line

Or am I misunderstanding? =)

Sounds reasonable, but have you actually tested compilation on the architectures you're changing?

No, I have not. However, grepping shows that it's pretty safe:

$ find . | xargs grep asm/suspend

(files in arch/powerpc, arch/x86, arch/sh and kernel/power/disk.c)

Basically, the patch is doing further cleanups on top of:

Quoted 8 lines

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a8af78982ff4c0b3731527b0217d286a343a3089

Since that patch is included upstream already it is safe to assume that <asm/suspend.h> is only needed by architectures setting ARCH_HIBERNATION_POSSIBLE. Which means powerpc, x86 and sh. The rest of the header files can go away.

Still want me to compile test for all architectures affected?

No, thanks.

Best,
Rafael

#7 lore raw
In reply to Pavel Machek
Quoted 23 lines · Pavel Machek
Quoted 22 lines · Magnus Damm

Hi Pavel,

Quoted 4 lines · Pavel Machek
Quoted 3 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Quoted 8 lines
Quoted 6 lines

This patch removes unused asm/suspend.h files for
the following architectures:

alpha, arm, ia64, m68k, mips, s390, um

Are you sure? arm does support suspend...

Not sure, but these days <asm/suspend.h> is only included from kernel/power/disk.c. And that file is only built if CONFIG_HIBERNATION is set. I've grepped for arch_prepare_suspend and ARCH_HIBERNATION_POSSIBLE but I don't get any matches under arch/arm...

Quoted 7 lines
Quoted 1 line

Or am I misunderstanding? =)

I did rm arch/arm/include/asm/suspend.h and ran test compile on zaurus; it seems ok. Because no other architectures are close to supporting suspend/hibernation, I think I can

Applied to the suspend tree.

Thanks,
Rafael