[PATCH v3 5/5] drivers/mailbox: Add aspeed ast2400/ast2500 mbox driver
Joel Stanley
joel at jms.id.au
Wed Jan 11 14:54:21 AEDT 2017
On Wed, Jan 11, 2017 at 11:33 AM, Joel Stanley <joel at 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.
Carry on.
Cheers,
Joel
More information about the openbmc
mailing list