bnxt_en: Simplify __bnxt_poll_cqs_done().
authorMichael Chan <michael.chan@broadcom.com>
Sun, 8 Mar 2020 22:45:48 +0000 (18:45 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Mar 2020 04:54:46 +0000 (21:54 -0700)
commit340ac85eabce302aeb3ae7e1817a8bbd4ffd09b2
treec6566e603034b0293d0da57843cb808508ab0f65
parent54a9062f6909bed8667984c1726bce8183c72118
bnxt_en: Simplify __bnxt_poll_cqs_done().

Simplify the function by removing tha 'all' parameter.  In the current
code, the caller has to specify whether to update/arm both completion
rings with the 'all' parameter.

Instead of this, we can just update/arm all the completion rings
that have been polled.  By setting cpr->had_work_done earlier in
__bnxt_poll_work(), we know which completion ring has been polled
and can just update/arm all the completion rings with
cpr->had_work_done set.

This simplifies the function with one less parameter and works just
as well.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c