Commit cdb8826c authored by Federico Vaga's avatar Federico Vaga

sw:drv: optimize irq our freeslot warning

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 23ac438d
......@@ -1018,7 +1018,7 @@ irqreturn_t trtl_irq_handler_out(int irq_core_base, void *arg)
{
struct trtl_dev *trtl =arg;
uint64_t status;
int i;
int i, freeslots;
struct trtl_hmq *hmq;
status = trtl_hmq_irq_status_out(trtl);
......@@ -1040,7 +1040,12 @@ irqreturn_t trtl_irq_handler_out(int irq_core_base, void *arg)
* It should never happen that we get an interrupt and
* there are no free slots
*/
WARN_ON(trtl_hmq_free_slots(hmq, 1) == 0);
freeslots = trtl_hmq_free_slots(hmq, 1);
if (unlikely(!freeslots)) {
WARN(1,
"There must be a freeslot if we got an interrupt\n");
continue;
}
trtl_mesage_push_from_buf(hmq);
}
......
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