lkml.org 
[lkml]   [2015]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] drivers: staging: wilc1000: Replace message queue with standard Linux lists
On Wed, Sep 30, 2015 at 06:12:50PM +0530, Chandra Gorentla wrote:
> > > while (1) {
> > > - wilc_mq_recv(&gMsgQHostIF, &msg, sizeof(struct host_if_msg), &u32Ret);
> > > + ret = wilc_mq_recv(&gMsgQHostIF, &msg,
> > > + sizeof(struct host_if_msg), &u32Ret);
> > > + if (ret)
> > > + continue;
> > > +
> >
> > I asked before if this was a forever loop and never got a response.
> > Also what does this have to do with list macros?
> The only exit condition of this loop is to receive a message
> 'HOST_IF_MSG_EXIT'. If this check is not there and 'wilc_mq_recv'
> returns an error, the switch case below it will be executed for
> the previously received message.

Oh, hm... It looks like wilc_mq_recv() can return -EFAULT, -EOVERFLOW
or success here. If it returns -EFUALT is calling wilc_mq_recv() again
really the right thing? I suspect we should break in that case. We
should probably at least sleep for a bit intsead of looping so tightly
if it returns -EOVERFLOW?

I'm not sure.

regards,
dan carpenter



\
 
 \ /
  Last update: 2015-09-30 15:41    [W:0.158 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site