All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Bur <cyrilbur@gmail.com>
To: Joel Stanley <joel@jms.id.au>
Cc: OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: [PATCH v3 5/5] drivers/mailbox: Add aspeed ast2400/ast2500 mbox driver
Date: Wed, 11 Jan 2017 15:06:02 +1100	[thread overview]
Message-ID: <1484107562.2182.0.camel@gmail.com> (raw)
In-Reply-To: <CACPK8Xdo3g9_vOV3PHfnLuO43dAdR2w56q5rrtTQYuQw_hW1_g@mail.gmail.com>

On Wed, 2017-01-11 at 14:54 +1100, Joel Stanley wrote:
> On Wed, Jan 11, 2017 at 11:33 AM, Joel Stanley <joel@jms.id.au> wrote:
> > > +       if ((file->f_flags & O_NONBLOCK) &&
> > > +               !(mbox_inb(mbox, MBOX_BMC_CTRL) & MBOX_CTRL_RECV))
> > > +                       return -EAGAIN;
> > > +       else if (wait_event_interruptible(mbox->queue,
> > > +                        mbox_inb(mbox, MBOX_BMC_CTRL) & MBOX_CTRL_RECV))
> > 
> > You read MBOX_BMC_CTRL twice. Is that intentional?
> 
> In fact, you keep reading it forever thanks to the magic of the
> wait_event_interruptible macro.
> 

Heh, yes. Although your spidey senses were correct the if condition is
wrong.

> Carry on.
> 
> Cheers,
> 
> Joel

  reply	other threads:[~2017-01-11  4:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10  9:06 [PATCH v3 0/5] LPC/MBOX work Cyril Bur
2017-01-10  9:06 ` [PATCH v3 1/5] Documentation: dt: mailbox: Add Aspeed ast2400/2500 bindings Cyril Bur
2017-01-10  9:06 ` [PATCH v3 2/5] Documentation: dt: misc: Add Aspeed ast2400/2500 LPC Control bindings Cyril Bur
2017-01-11  1:29   ` Andrew Jeffery
2017-01-10  9:06 ` [PATCH v3 3/5] ARM: dts: aspeed: Add mailbox and LPC Control nodes Cyril Bur
2017-01-11  0:57   ` Joel Stanley
2017-01-10  9:06 ` [PATCH v3 4/5] drivers/misc: Add aspeed ast2400/ast2500 lpc controlling driver Cyril Bur
2017-01-10  9:06 ` [PATCH v3 5/5] drivers/mailbox: Add aspeed ast2400/ast2500 mbox driver Cyril Bur
2017-01-11  0:33   ` Joel Stanley
2017-01-11  3:54     ` Joel Stanley
2017-01-11  4:06       ` Cyril Bur [this message]
2017-01-11  1:27   ` Andrew Jeffery

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=1484107562.2182.0.camel@gmail.com \
    --to=cyrilbur@gmail.com \
    --cc=joel@jms.id.au \
    --cc=openbmc@lists.ozlabs.org \
    /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.