On Wednesday, June 1, 2016 10:52:03 AM CEST Binoy Jayan wrote: > The semaphore 'cmd_queue_sema' is used as completion, > so convert it to a struct completion type. > > Signed-off-by: Binoy Jayan <binoy.jayan@xxxxxxxxxx> > --- The conversion looks correct, and I see that you have driverdev-devel@xxxxxxxxxxxxxxxxxxxxxx with this series now (as I just replied to the rtl8192e series, you missed that there). You should still add linux-kernel@xxxxxxxxxxxxxxx for completeness when you resend (don't resend just for the Cc). > +static inline u32 _wait_completion(struct completion *comp) > +{ > + if (wait_for_completion_interruptible(comp)) > + return _FAIL; > + return _SUCCESS; > +} > + This is nonstandard coding style. I realize you are trying to fit in with what the driver does for other functions, but since this is a staging driver, it's better to convert it to normal kernel style when you make a change like this. > diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c > index 50f4002..0432702 100644 > --- a/drivers/staging/rtl8712/rtl8712_cmd.c > +++ b/drivers/staging/rtl8712/rtl8712_cmd.c > @@ -322,7 +322,7 @@ int r8712_cmd_thread(void *context) > > allow_signal(SIGTERM); > while (1) { > - if ((_down_sema(&(pcmdpriv->cmd_queue_sema))) == _FAIL) > + if ((_wait_completion(&(pcmdpriv->cmd_queue_comp))) == _FAIL) > break; > if (padapter->bDriverStopped || padapter->bSurpriseRemoved) > break; so just call wait_for_completion_interruptible() here directly and remove the extra braces and the comparison of the return value. Arnd _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel