bnxt_en: refactor bnxt_alloc_fw_health()
authorEdwin Peer <edwin.peer@broadcom.com>
Sun, 4 Oct 2020 19:22:52 +0000 (15:22 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 4 Oct 2020 21:41:05 +0000 (14:41 -0700)
commit3e9ec2bb932d746b0ae65aba79697457e7c83f90
tree22f73818bbd1daa605ba7165c4973dd452c48e4e
parent424174f14eeccfea747d9f078a41bd393ffe0bde
bnxt_en: refactor bnxt_alloc_fw_health()

The allocator for the firmware health structure conflates allocation
and capability checks, limiting the reusability of the code. This patch
separates out the capability check and disablement and improves the
warning message to better describe the consequences of an allocation
failure.

Signed-off-by: Edwin Peer <edwin.peer@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.c