On Mon, Aug 21, 2006 at 09:36:50PM -0700, Andrew Morton ([EMAIL PROTECTED]) wrote: > On Mon, 21 Aug 2006 16:09:34 +0400 > Evgeniy Polyakov <[EMAIL PROTECTED]> wrote: > > > On Mon, Aug 21, 2006 at 12:12:39PM +0100, Christoph Hellwig ([EMAIL > > PROTECTED]) wrote: > > > > +static int __init kevent_init_timer(void) > > > > +{ > > > > + struct kevent_callbacks tc = { > > > > + .callback = &kevent_timer_callback, > > > > + .enqueue = &kevent_timer_enqueue, > > > > + .dequeue = &kevent_timer_dequeue}; > > > > > > I think this should be static, and the normal style to write it would be: > > > > > > static struct kevent_callbacks tc = { > > > .callback = kevent_timer_callback, > > > .enqueue = kevent_timer_enqueue, > > > .dequeue = kevent_timer_dequeue, > > > }; > > > > > > also please consider makring all the kevent_callbacks structs const > > > to avoid false cacheline sharing and accidental modification, similar > > > to what we did to various other operation vectors. > > > > Actually I do not think it should be static, since it is only used for > > initialization and it's members are copied into main structure. > > > > It should be static __initdata a) so we don't need to construct it at > runtime and b) so it gets dropped from memory after initcalls have run. > > (But given that kevent_init_timer() also gets dropped from memory after > initcalls > it hardly matters).
That's what I'm talking about. -- Evgeniy Polyakov - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html