bnxt_en: Refactor __bnxt_vf_reps_destroy().
authorMichael Chan <michael.chan@broadcom.com>
Mon, 12 Apr 2021 00:18:14 +0000 (20:18 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Apr 2021 20:20:38 +0000 (13:20 -0700)
commit90f4fd02968720bdeb38a16deeff96fa770206e4
treefb3fabc0419a913034963ffcbcdd77dbba15efcf
parentea2d37b2b3079a896bc3f44a1962d3f01aa81b7f
bnxt_en: Refactor __bnxt_vf_reps_destroy().

Add a new helper function __bnxt_free_one_vf_rep() to free one VF rep.
We also reintialize the VF rep fields to proper initial values so that
the function can be used without freeing the VF rep data structure.  This
will be used in subsequent patches to free and recreate VF reps after
error recovery.

Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Reviewed-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c