Re: [PATCH 12/13] mailbox: omap: Reverse FIFO busy check logic

2024-04-01 Thread Andrew Davis
On 4/1/24 6:31 PM, Hari Nagalla wrote: On 3/25/24 12:20, Andrew Davis wrote:   static int omap_mbox_chan_send_noirq(struct omap_mbox *mbox, u32 msg)   { -    int ret = -EBUSY; +    if (mbox_fifo_full(mbox)) +    return -EBUSY; -    if (!mbox_fifo_full(mbox)) { -   

Re: [PATCH 12/13] mailbox: omap: Reverse FIFO busy check logic

2024-04-01 Thread Hari Nagalla
On 3/25/24 12:20, Andrew Davis wrote: static int omap_mbox_chan_send_noirq(struct omap_mbox *mbox, u32 msg) { - int ret = -EBUSY; + if (mbox_fifo_full(mbox)) + return -EBUSY; - if (!mbox_fifo_full(mbox)) { - omap_mbox_enable_irq(mbox, IRQ_RX); -

[PATCH 12/13] mailbox: omap: Reverse FIFO busy check logic

2024-03-25 Thread Andrew Davis
It is much more clear to check if the hardware FIFO is full and return EBUSY if true. This allows us to also remove one level of indention from the core of this function. It also makes the similarities between omap_mbox_chan_send_noirq() and omap_mbox_chan_send() more obvious. Signed-off-by: