[parisc-linux-cvs] Re: 2.4.19-pa16 DIFF fix circular dependency
Grant Grundler
grundler@dsl2.external.hp.com
Sat, 14 Sep 2002 17:45:30 -0600
Matthew Wilcox wrote:
> Yeah, this is just not right. You shouldn't conditionalise inclusion
> on CONFIG_SMP.
linux/spinlock.h includes asm/spinlock.h conditionally
in all the trees (including 2.5) I've seen.
> And you should include <linux/foo.h> if it exists,
> which it does for spinlock.h. It doesn't for atomic.h, so there's
> nothing wrog with that.
Ah true - forgot about that.
I'll fix that for the files I just touched.
And then I can/will remove the conditional around it too.
BTW, this is wider problem. See fgrep below.
(and ignore usage in include/asm-*, I think those are ok)
thanks,
grant
grundler <511>find -name '*.[chS]' | xargs fgrep asm/spinlock.h
./arch/sparc/lib/debuglocks.c:/* To enable this code, just define SPIN_LOCK_DEBUG in asm/spinlock.h */
./arch/sparc/lib/locks.S:#include <asm/spinlock.h>
./drivers/char/mwave/mwavedd.c:#include <asm/spinlock.h>
./drivers/message/fusion/isense.c:#include <asm/spinlock.h>
./drivers/net/wan/lmc/lmc_main.c://#include <asm/spinlock.h>
./drivers/net/wan/lmc/lmc_media.c://#include <asm/spinlock.h>
./drivers/s390/ccwcache.c:#include <asm/spinlock.h>
./drivers/scsi/sym53c8xx_2/sym_glue.h:#include <asm/spinlock.h>
./drivers/scsi/advansys.c:#include <asm/spinlock.h>
./drivers/scsi/gdth.c:#include <asm/spinlock.h>
./drivers/scsi/ips.c:/* - Use linux/spinlock.h instead of asm/spinlock.h for kernels */
./drivers/scsi/ips.c: #include <asm/spinlock.h>
./drivers/scsi/megaraid.c:#include <asm/spinlock.h>
./drivers/scsi/ncr53c8xx.c:#include <asm/spinlock.h>
./drivers/scsi/sym53c8xx.c:#include <asm/spinlock.h>
./drivers/scsi/tmscsim.c:# include <asm/spinlock.h>
./include/asm-m68k/apollodma.h:#include <asm/spinlock.h> /* And spinlocks */
./include/asm-mips/smp.h:#include <asm/spinlock.h>
./include/asm-parisc/atomic.h:/* copied from <asm/spinlock.h> and modified.
./include/asm-s390/debug.h: #include <asm/spinlock.h>
./include/asm-s390x/debug.h: #include <asm/spinlock.h>
./include/linux/mtd/flashchip.h: * has asm/spinlock.h, or 2.4, which has linux/spinlock.h
./include/linux/fs_struct.h:#include <asm/spinlock.h>
./include/linux/spinlock.h:#include <asm/spinlock.h>
./include/linux/spinlock.h: defined (e.g. by including asm/spinlock.h */
./include/linux/wanrouter.h: #include <asm/spinlock.h> /* Support for SMP Locking */
grundler <512>