Prev: [GIT PULL for 2.6.35] Fixes for i7core/nehalem EDAC driver
Next: [PATCH] msm: gpio: Add set_wake support to msm7200a-gpio's irq_chip.
From: Christoph Hellwig on 2 Jul 2010 17:20 On Fri, Jul 02, 2010 at 10:43:13PM +0200, Arnd Bergmann wrote: > On Friday 02 July 2010 21:19:11 Matthew Wilcox wrote: > > Why a new header file instead of linux/types.h? > > I think it mostly makes sense because a list_head by itself usually > isn't all that useful, you also want the list_add/list_for_each/... > macros, so you end up including linux/list.h anyway. It's useful for headers. You can assume linux/types.h is already included and don't have to bother to include list{_types}.h everywhere. -- 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: Alexey Dobriyan on 3 Jul 2010 04:50
On Fri, Jul 02, 2010 at 02:48:17PM -0600, Matthew Wilcox wrote: > 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 *cough* You may want to run spinlock_types.h through preprocessor and see how much garbage it will produce. > merged into types.h, personally. They're all pretty fundamental kernel > kind of types. Also we care about compilation speed. > 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. Me too. Also jumping over one file to understand what's going on is better than jumping over multiple files. > Which is how we ended up with atomic_t and atomic64_t in there in the > first place :-) -- 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/ |