Prev: [PATCH -V2 07/16] richacl: Update the file masks in chmod()
Next: Break out types from <linux/list.h> to <linux/list_types.h>.
From: Matthew Wilcox on 2 Jul 2010 15:20 On Fri, Jul 02, 2010 at 01:41:14PM -0400, Chris Metcalf wrote: > This allows a list_head (or hlist_head, etc.) to be used from places > that used to be impractical, in particular <asm/processor.h>, which > used to cause include file recursion: <linux/list.h> includes > <linux/prefetch.h>, which always includes <asm/processor.h> for the > prefetch macros, as well as <asm/system.h>, which often includes > <asm/processor.h> directly or indirectly. Why a new header file instead of linux/types.h? -- Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Matthew Wilcox on 2 Jul 2010 16:50 On Fri, Jul 02, 2010 at 03:33:52PM -0400, Chris Metcalf wrote: > On 7/2/2010 3:19 PM, Matthew Wilcox wrote: > > Why a new header file instead of linux/types.h? > > I was working from analogy to kvm_types.h, mm_types.h, rwlock_types.h, > spinlock_types.h. My impression is that linux/types.h is generally for > basic (non-struct) types, with atomic_t/atomic64_t being added as > "almost non-struct types", and of course the historical exception of > "struct ustat", which has been there since the dawn of time (0.97 anyway). I think list_head, hlist_head and hlist_node qualify as "almost non-struct types", don't you? :-) I wouldn't mind seeing kvm_types.h, rwlock_types.h and spinlock_types.h merged into types.h, personally. They're all pretty fundamental kernel kind of types. It's a matter of taste, and I'm not particularly fussed one way or the other. mm_types.h is complex and full of mm-specific information, so keeping it separate makes sense to me. I just object to the unnecessary creation of tiny files like this. Which is how we ended up with atomic_t and atomic64_t in there in the first place :-) -- Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Matthew Wilcox on 3 Jul 2010 23:30
On Sat, Jul 03, 2010 at 09:47:58PM -0400, Chris Metcalf wrote: > Sounds like we have a consensus on moving the list_head, hlist_head, and > hlist_node types to <linux/types.h>. I assume everyone is agreed that > initializers, etc., should stay in <linux/list.h>. I will send out a > revised git patch on Sunday. Yes, I think that's reasonable. By way of comparison, ATOMIC_INIT, etc. stayed in atomic.h. It makes sense -- you only need the types for structure definitions, you don't need the initialisers. I suppose if you have a header which defines an initialiser like sched.h does, you'll want the list.h initialisers, but anything that complex should be able to handle including the full list.h header. -- Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |