Hello, A couple of other quick notes as I read this code: On Fri, Mar 02, 2012 at 09:26:34PM +0100, Dmitry Tarnyagin wrote: > +static inline void __cw1200_free_event_queue(struct list_head *list) > +{ > + while (!list_empty(list)) { > + struct cw1200_wsm_event *event = > + list_first_entry(list, struct cw1200_wsm_event, > + link); > + list_del(&event->link); > + kfree(event); > + } I think perhaps you can use list_for_each_entry_safe() here... > + LIST_HEAD(list); [...] > + spin_lock(&priv->event_queue_lock); > + list_splice_init(&priv->event_queue, &list); > + spin_unlock(&priv->event_queue_lock); > + __cw1200_free_event_queue(&list); ...and then you won't need to do the above? > + if (priv->listening ^ listening) { That's a unusual (to me anyway) way to spell "a != b". On my version of gcc, generated code is exactly the same. -- Bob Copeland %% www.bobcopeland.com -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html