Commit b415df84 authored by Federico Vaga's avatar Federico Vaga

style: improve readability

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent f17ee1e6
......@@ -251,13 +251,15 @@ static bool do_rx(struct wrn_dev *dev, wrn_message& msg, int& slot)
{
uint32_t in_stat = hmq_readl(dev, MQUEUE_BASE_GCR, MQUEUE_GCR_SLOT_STATUS);
if(in_stat & MQUEUE_GCR_SLOT_STATUS_OUT_MASK)
{
if(!(in_stat & MQUEUE_GCR_SLOT_STATUS_OUT_MASK))
return false;
int i, j;
for(i = 0; i < dev->hmq.n_out; i++)
{
if (in_stat & (1<<i))
{
if (!(in_stat & (1<<i)))
continue;
uint32_t slot_stat = hmq_readl (dev, MQUEUE_BASE_OUT(i), MQUEUE_SLOT_STATUS );
int size = (slot_stat & MQUEUE_SLOT_STATUS_MSG_SIZE_MASK) >> MQUEUE_SLOT_STATUS_MSG_SIZE_SHIFT;
msg.clear();
......@@ -282,8 +284,6 @@ static bool do_rx(struct wrn_dev *dev, wrn_message& msg, int& slot)
}
return true;
}
}
}
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment