From: Dan Carpenter <dan.carpenter@oracle.com>
To: Chandra Gorentla <csgorentla@gmail.com>
Cc: rachel.kim@atmel.com, dean.lee@atmel.com, chris.park@atmel.com,
gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
linux-wireless@vger.kernel.org, johnny.kim@atmel.com,
linux-kernel@vger.kernel.org, sudipm.mukherjee@gmail.com
Subject: Re: [PATCH 1/2] drivers: staging: wilc1000: Replace message queue with standard Linux lists
Date: Wed, 30 Sep 2015 16:22:07 +0300 [thread overview]
Message-ID: <20150930132207.GH7340@mwanda> (raw)
In-Reply-To: <20150930124250.GB4704@gcs-HP-Notebook>
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
prev parent reply other threads:[~2015-09-30 13:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-28 18:13 [PATCH 1/2] drivers: staging: wilc1000: Replace message queue with standard Linux lists Chandra S Gorentla
2015-09-28 18:13 ` [PATCH 2/2] drivers: staging: wilc1000: wilc_msgqueue.c: Remove code that no effect Chandra S Gorentla
2015-09-28 18:13 ` [PATCH 2/2] drivers: staging: wilc1000: wilc_msgqueue.c: Remove ineffective code Chandra S Gorentla
2015-09-28 18:37 ` [PATCH 2/2] drivers: staging: wilc1000: wilc_msgqueue.c: Remove code that no effect Chandra Gorentla
2015-09-29 0:43 ` Greg KH
2015-09-29 0:44 ` [PATCH 1/2] drivers: staging: wilc1000: Replace message queue with standard Linux lists Greg KH
2015-09-30 12:29 ` Chandra Gorentla
2015-09-29 2:31 ` Dan Carpenter
2015-09-30 12:42 ` Chandra Gorentla
2015-09-30 13:22 ` Dan Carpenter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150930132207.GH7340@mwanda \
--to=dan.carpenter@oracle.com \
--cc=chris.park@atmel.com \
--cc=csgorentla@gmail.com \
--cc=dean.lee@atmel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=johnny.kim@atmel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=rachel.kim@atmel.com \
--cc=sudipm.mukherjee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.