]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9ddfc79099402786de7db58ff1a9f025a2023c3c
tree22f73818bbd1daa605ba7165c4973dd452c48e4e
parent5fa67581db869682e8168f187a6bfd09d23f63fb
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