Skip to content

Commit

Permalink
linux/ena: Remove redundant assert check and error prints
Browse files Browse the repository at this point in the history
Remove WARN checks from ena_com_wait_and_process_admin_cq_polling
since once the execution flow reaches the check, it must be
ENA_CMD_COMPLETED because it can't be either of the other options:
1. ENA_CMD_ABORTED - in such case it will perform "goto err" in the "if"
   block above, thus skipping the WARN check.
2. ENA_CMD_SUBMITTED - in such case it will timeout inside the while(1)
   loop above and perform "goto err", thus skipping the WARN check.

Signed-off-by: Evgeny Ostrovsky <[email protected]>
  • Loading branch information
evgeny17387new committed Feb 21, 2024
1 parent 5b821cf commit cea2183
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions kernel/linux/common/ena_com/ena_com.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,6 @@ static int ena_com_wait_and_process_admin_cq_polling(struct ena_comp_ctx *comp_c
goto err;
}

WARN(comp_ctx->status != ENA_CMD_COMPLETED, "Invalid comp status %d\n", comp_ctx->status);

ret = ena_com_comp_status_to_errno(admin_queue, comp_ctx->comp_status);
err:
comp_ctxt_release(admin_queue, comp_ctx);
Expand Down

0 comments on commit cea2183

Please sign in to comment.