On Mon, 2014-03-03 at 13:27 +0530, Fariya Fatima wrote: > +static inline int rsi_init_event(struct rsi_event *pevent) > +{ > + atomic_set(&pevent->event_condition, 1); > + init_waitqueue_head(&pevent->event_queue); > + return 0; > +} > + > +static inline int rsi_wait_event(struct rsi_event *event, u32 timeout) > +{ > + int status = 0; > + > + if (!timeout) > + status = wait_event_interruptible(event->event_queue, > + (atomic_read(&event->event_condition) == 0)); > + else > + status = wait_event_interruptible_timeout(event->event_queue, > + (atomic_read(&event->event_condition) == 0), > + timeout); > + return status; > +} I think you should inline that, the extra code here is pretty pointless. > +static inline int rsi_create_kthread(struct rsi_common *common, > + struct rsi_thread *thread, > + void *func_ptr, > + u8 *name) > +{ > + init_completion(&thread->completion); > + thread->task = kthread_run(func_ptr, common, name); > + if (!IS_ERR(thread->task)) > + return 0; > + > + return -1; > +} -1 is -EPERM, that's likely not a good idea. johannes -- 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