* current BK compilation failure on ppc32
@ 2004-07-03 18:56 Christoph Hellwig
2004-07-03 20:50 ` Pavel Machek
2004-07-03 21:45 ` Linus Torvalds
0 siblings, 2 replies; 4+ messages in thread
From: Christoph Hellwig @ 2004-07-03 18:56 UTC (permalink / raw)
To: torvalds, pavel; +Cc: linux-kernel
kernel/power/smp.c: In function `smp_pause':
kernel/power/smp.c:24: error: storage size of `ctxt' isn't known
kernel/power/smp.c:24: warning: unused variable `ctxt'
kernel/power/smp.c seems to be inherently swsusp-specific but is
compiled for CONFIG_PM. (Same seems to be true for amny other files
in kernel/power/, but as they compile it only causes bloat..)
--- 1.10/kernel/power/Makefile 2004-07-02 07:23:47 +02:00
+++ edited/kernel/power/Makefile 2004-07-03 22:07:29 +02:00
@@ -1,5 +1,7 @@
obj-y := main.o process.o console.o pm.o
+ifeq ($(CONFIG_SOFTWARE_SUSPEND), y)
obj-$(CONFIG_SMP) += smp.o
+endif
obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o
obj-$(CONFIG_PM_DISK) += disk.o pmdisk.o
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: current BK compilation failure on ppc32
2004-07-03 18:56 current BK compilation failure on ppc32 Christoph Hellwig
@ 2004-07-03 20:50 ` Pavel Machek
2004-07-03 21:45 ` Linus Torvalds
1 sibling, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2004-07-03 20:50 UTC (permalink / raw)
To: Christoph Hellwig, torvalds, linux-kernel
Hi!
> kernel/power/smp.c: In function `smp_pause':
> kernel/power/smp.c:24: error: storage size of `ctxt' isn't known
> kernel/power/smp.c:24: warning: unused variable `ctxt'
>
> kernel/power/smp.c seems to be inherently swsusp-specific but is
> compiled for CONFIG_PM. (Same seems to be true for amny other files
> in kernel/power/, but as they compile it only causes bloat..)
Patch is good, thanks and sorry for breakage.
Pavel
> --- 1.10/kernel/power/Makefile 2004-07-02 07:23:47 +02:00
> +++ edited/kernel/power/Makefile 2004-07-03 22:07:29 +02:00
> @@ -1,5 +1,7 @@
> obj-y := main.o process.o console.o pm.o
> +ifeq ($(CONFIG_SOFTWARE_SUSPEND), y)
> obj-$(CONFIG_SMP) += smp.o
> +endif
> obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o
> obj-$(CONFIG_PM_DISK) += disk.o pmdisk.o
>
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: current BK compilation failure on ppc32
2004-07-03 18:56 current BK compilation failure on ppc32 Christoph Hellwig
2004-07-03 20:50 ` Pavel Machek
@ 2004-07-03 21:45 ` Linus Torvalds
2004-07-04 8:29 ` Christoph Hellwig
1 sibling, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2004-07-03 21:45 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: pavel, linux-kernel
On Sat, 3 Jul 2004, Christoph Hellwig wrote:
>
> kernel/power/smp.c seems to be inherently swsusp-specific but is
> compiled for CONFIG_PM. (Same seems to be true for amny other files
> in kernel/power/, but as they compile it only causes bloat..)
>
>
> --- 1.10/kernel/power/Makefile 2004-07-02 07:23:47 +02:00
> +++ edited/kernel/power/Makefile 2004-07-03 22:07:29 +02:00
> @@ -1,5 +1,7 @@
> obj-y := main.o process.o console.o pm.o
> +ifeq ($(CONFIG_SOFTWARE_SUSPEND), y)
> obj-$(CONFIG_SMP) += smp.o
> +endif
Don't do it like that.
Instead, do something like
smp-power-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_SOFTWARE_SUSPEND) += $(smp-power-y)
which not only is shorter, but gets a _lot_ more readable after a while.
It's also extremely useful for constructs like "include this file X is
either 'y' or 'm'". From fs/Makefile:
..
nfsd-$(CONFIG_NFSD) := nfsctl.o
obj-y += $(nfsd-y) $(nfsd-m)
..
which just means that "nfsctl.o" will be compiled in if nfsd is
compiled-in or a module.
You can make pretty complex decision trees this way - much more readably
than by explicit comparisons.
Linus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: current BK compilation failure on ppc32
2004-07-03 21:45 ` Linus Torvalds
@ 2004-07-04 8:29 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2004-07-04 8:29 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Christoph Hellwig, pavel, linux-kernel
> Don't do it like that.
>
> Instead, do something like
>
> smp-power-$(CONFIG_SMP) += smp.o
> obj-$(CONFIG_SOFTWARE_SUSPEND) += $(smp-power-y)
>
> which not only is shorter, but gets a _lot_ more readable after a while.
New patch below:
--- 1.10/kernel/power/Makefile 2004-07-02 07:23:47 +02:00
+++ edited/kernel/power/Makefile 2004-07-04 12:21:57 +02:00
@@ -1,6 +1,8 @@
+
+swsusp-smp-$(CONFIG_SMP) += smp.o
+
obj-y := main.o process.o console.o pm.o
-obj-$(CONFIG_SMP) += smp.o
-obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o
+obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o $(swsusp-smp-y)
obj-$(CONFIG_PM_DISK) += disk.o pmdisk.o
obj-$(CONFIG_MAGIC_SYSRQ) += poweroff.o
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-07-04 8:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-03 18:56 current BK compilation failure on ppc32 Christoph Hellwig
2004-07-03 20:50 ` Pavel Machek
2004-07-03 21:45 ` Linus Torvalds
2004-07-04 8:29 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox